New Record not updating (1 Viewer)

RJW

Registered User.
Local time
Today, 04:34
Joined
Sep 21, 2006
Messages
44
My database has only two tables
Form 1 has three steps each with their own button, each button opens a new form.

Step 1 - Button 1, opens Form 2. Which has a button that runs an update query that resets 15 Yes/No fields in Table A to no. Closing Form 2 returns the user to Form 1

Step 2 - Button 2, opens Form 3. This form allows the user to add a new record to Table A. Closing Form 3 returns the user to Form 1

Step 3 - Button 3, opens Form 4. This form has one textbox and one button and does two things. When the button is clicked it ...

- It resets the values on the only field in Table B, based on the value entered into the textbox on Form 4.

- It then updates two Yes/No fields for all the records in Table A to yes with vba UPDATE code.

My problem:

If I add a new record in step two
The two fields in the new record are not updated in step three.

How do I get step three to requery Table A, so that the UPDATE code updates ALL the records?

I hope I explained it clear enough.

Thanks

RJW
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:34
Joined
Oct 29, 2018
Messages
21,357
Hi,

Quick question, are you closing Form 3 before opening Form 4?
 

RJW

Registered User.
Local time
Today, 04:34
Joined
Sep 21, 2006
Messages
44
Yes, the Form for each step closes when it's finished. Form 1 stays open all the time.


RJW
 

RJW

Registered User.
Local time
Today, 04:34
Joined
Sep 21, 2006
Messages
44
I know why it's not working.

I update the fields based on matching the ID number as it loops through the code. But because of testing the 29th record's ID is not 29 it's 47 at the moment ... so no update

What I need is a loop that steps through the all records until EOF.

I'll google and find it.

To those you took the time to read and consider, thanks.
Sorry for the stupid mistake.


RJW
 

Users who are viewing this thread

Top Bottom