macro to update secondary form not displaying all records

lscheer

Registered User.
Local time
Today, 01:27
Joined
Jan 20, 2000
Messages
185
...or something like that.

Here's what I have.

)> A macro that essentially directs Form1 to
>Save
1.OpenForm2
2.FindRecord based on matching ID field between the two forms (to see if individual exists in Form2)
3.GoToRecord New (if meets the condition that the ID doesn't exist in Form2)
4.SetValue (to match IDs)

and that's it. Form2 is based on a query of the table from Form1 and a supplemental data table. The macro does exactly what it's supposed to do when it's placed on the AfterUpdate event from a field on Form1's subform (important: the subform is created from several fields and Form1's ID, but is only a one-to-one relationship, so in my opinion is extraneous; no it's not storing the same data, I've just split the data into two tables).

Now here's my problem:
If I try to use the same macro to do the same thing on nearly the same form it doesn't work. The form is different in that it is just one form, and doesnt have the subform. All the data is just displayed on the one form. When I run the macro, it opens Form2 and even appears to update the ID number when not found, however, when I requery the form, the record seems to not be there. If I close and then open Form2 again (exclusive of the macro), the record is there.

Does anyone have any idea what might be going on here? Might the form with the subform be the way to go? Thanks a lot.

[This message has been edited by lscheer (edited 09-25-2001).]

[This message has been edited by lscheer (edited 09-27-2001).]
 

Users who are viewing this thread

Back
Top Bottom