Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 12-07-2018, 09:21 AM   #1
RJW
Newly Registered User
 
Join Date: Sep 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
RJW is on a distinguished road
New Record not updating

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

RJW is offline   Reply With Quote
Old 12-07-2018, 10:19 AM   #2
theDBguy
Newly Registered User
 
theDBguy's Avatar
 
Join Date: Oct 2018
Posts: 235
Thanks: 3
Thanked 37 Times in 36 Posts
theDBguy is on a distinguished road
Re: New Record not updating

Hi,

Quick question, are you closing Form 3 before opening Form 4?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 12-07-2018, 10:39 AM   #3
RJW
Newly Registered User
 
Join Date: Sep 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
RJW is on a distinguished road
Re: New Record not updating

Yes, the Form for each step closes when it's finished. Form 1 stays open all the time.


RJW

RJW is offline   Reply With Quote
Old 12-07-2018, 11:18 AM   #4
RJW
Newly Registered User
 
Join Date: Sep 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
RJW is on a distinguished road
Re: New Record not updating

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
RJW is offline   Reply With Quote
Old 12-07-2018, 11:30 AM   #5
theDBguy
Newly Registered User
 
theDBguy's Avatar
 
Join Date: Oct 2018
Posts: 235
Thanks: 3
Thanked 37 Times in 36 Posts
theDBguy is on a distinguished road
Re: New Record not updating

Good luck!

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating record makes a copy of record? hugparty Forms 8 09-03-2011 08:16 AM
Updating data in "Find Record" combo box when current record on a form is changed Mel** Modules & VBA 4 01-04-2009 08:33 PM
Record not updating violentjay25 Modules & VBA 1 03-25-2005 12:27 PM
Updating record from previous record details MrTibbs Modules & VBA 2 09-01-2003 05:48 AM
Problem .. Instead of updating the changed record..the form adds another like record dmeid Forms 6 11-20-2002 09:04 AM




All times are GMT -8. The time now is 05:34 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World