Data Entry not working as Intended

Macro.PNG

that was me trying to force it to be empty I can remove it.
 
Sorry I tested positive for covid so i have not been to work to play with this database for the past few weeks. I removed the macro and did C&R and I am still getting information in my subform.
 
Sorry I tested positive for covid so i have not been to work to play with this database for the past few weeks. I removed the macro and did C&R and I am still getting information in my subform.
Hi. Glad to hear you're okay. Are you able to post a sample db with test data?
 
if you open the soldier data form search for "Mann" and open the leave tab you will see data in the fields and there shouldn't be any data in there since its a data entry subform
 
I would have thought that is exactly how the subform should work as it shows all leave taken by Mann?
 
It is set to data entry I do not want it to show data. It is supposed to be empty at all times and you input new leaves when they arrive. To view all of "Mann's" leave you click the button
 
if you open the soldier data form search for "Mann" and open the leave tab you will see data in the fields and there shouldn't be any data in there since its a data entry subform
This is not the correct fix, but try it now...
 

Attachments

ok yeah it works now, what did you change other then the obvious visual changes?
 
thanks DBGuy, what did you do for the fix?
It appeared your search code was resetting the Data Entry property for some reason, so I just set it back. However, if I discover the actual reason for it behaving like that, then I can give you the "correct" solution. I already tried replacing your recordset with a clone, but it didn't make any difference.
 
Yes! That one.
Actually, I could be wrong. I just redownloaded your original file, and the Data Entry is not behaving correctly even if I don't use the Search button. I'll keep checking though...
 
Actually, I could be wrong. I just redownloaded your original file, and the Data Entry is not behaving correctly even if I don't use the Search button. I'll keep checking though...
Okay, just as an experiment, please check out the attached.

If you open the form, you'll see I moved your subform out of the tab control, just to see if the tab control was causing the problem. Don't use the search feature; instead, just use the navigation button and move through the next records.

When that didn't work out as expected, I created a new subform to see if the problem is with the subform and placed it to the right of the first one. You'll see that they both behave the same way.

Then, I created a new main form to see if the problem is with the main form, since I didn't see any code behind the main form that could be causing the problem. So, open up Form1, and you will see that the new subform is behaving correctly.

Then, as a final experiment, I added your original subform to the bottom of this new form. You will notice it also behaves normal, not like how it behaves when on your original main form.

As a conclusion, it's possible your main form is corrupted.

Hope that helps...
 

Attachments

Users who are viewing this thread

Back
Top Bottom