Linking Forms for new record

V

Valerie

I am creating a database that tracks needs filled by various churches for
things such as food, clothing, diapers, and money for various things. I am
basing it on a prior database created in DOS, so I can't change too much so
the old data can be compatible.

For adding and editing data, I have a series of 4 forms: SSN, Client
Information, Additional Adults and Kids, Referrals. The SSN form collects 2
SSNs, and checks to see if they are new or existing records. Everything
works fine for existing records, the forms open to the correct record, but I
am having a problem with new records. After entering the new SSNs, a button
opens Client Information with the new SSNs filled in, and a new Client ID
(not an autonumber, since there is previous data I need to put in) which just
adds 1 number to the max existing ID. This works fine. It is when I click
the button to open to the next form, Additional Adults and Kids, where I have
the problem. It does not go to the same Client ID, instead it goes to a new
record with nothing filled in. This form has some of the fields from Client
Information on top and a subform to enter kids on the bottom. I have checked
all the settings, and I can't find what I did wrong.

I have noticed that if I click on the toggle filter button twice (off then
on), it does go to the proper record. Then, I am able to enter information
and go to the last form just fine.

How can I get it to go to the right record without having to toggle the
filter. (I tried toggling the filter off then on using code, but it didn't
solve the problem.)

Let me know if you need to see some of the code.
 
B

Beetle

Are you saving the new record on the Client Information
form before you attempt to open the Additional Adults form?
You can do so with the following line added to the code for
your command button;

If Me.Dirty Then Me.Dirty = False

Place it somewhere prior to the line that opens the other form.
 
V

Valerie

Thank you, this did the trick! Funny, I thought I had already tried saving
it a different way that didn't work, but this one did.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top