Data Entry not working as Intended (1 Viewer)

Valentine

Member
Local time
Today, 07:22
Joined
Oct 1, 2021
Messages
261
Macro.PNG

that was me trying to force it to be empty I can remove it.
 

Valentine

Member
Local time
Today, 07:22
Joined
Oct 1, 2021
Messages
261
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.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:22
Joined
Oct 29, 2018
Messages
21,358
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?
 

Valentine

Member
Local time
Today, 07:22
Joined
Oct 1, 2021
Messages
261
ok I have taken all the personal data out
 

Attachments

  • Testing.accdb
    3.8 MB · Views: 89

Valentine

Member
Local time
Today, 07:22
Joined
Oct 1, 2021
Messages
261
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
 

mike60smart

Registered User.
Local time
Today, 11:22
Joined
Aug 6, 2017
Messages
1,899
I would have thought that is exactly how the subform should work as it shows all leave taken by Mann?
 

Valentine

Member
Local time
Today, 07:22
Joined
Oct 1, 2021
Messages
261
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
 

mike60smart

Registered User.
Local time
Today, 11:22
Joined
Aug 6, 2017
Messages
1,899
Hi

I have corrected and this version now does what you want.
 

Attachments

  • Testing.accdb
    4.3 MB · Views: 89

mike60smart

Registered User.
Local time
Today, 11:22
Joined
Aug 6, 2017
Messages
1,899
On the Subform On Current Event it goes to a New Record
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:22
Joined
Oct 29, 2018
Messages
21,358
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

  • Testing.zip
    375.2 KB · Views: 79

Valentine

Member
Local time
Today, 07:22
Joined
Oct 1, 2021
Messages
261
ok yeah it works now, what did you change other then the obvious visual changes?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:22
Joined
Oct 29, 2018
Messages
21,358
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.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:22
Joined
Oct 29, 2018
Messages
21,358
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...
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:22
Joined
Oct 29, 2018
Messages
21,358
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

  • Testing (1).zip
    377.8 KB · Views: 70

Users who are viewing this thread

Top Bottom