If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Linking Forms for new record
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. -- Valerie |
#2
|
|||
|
|||
Linking Forms for new record
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. -- _________ Sean Bailey "Valerie" wrote: 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. -- Valerie |
#3
|
|||
|
|||
Linking Forms for new record
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. -- Valerie "Beetle" wrote: 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. -- _________ Sean Bailey "Valerie" wrote: 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. -- Valerie |
#4
|
|||
|
|||
Linking Forms for new record
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. -- Valerie "Beetle" wrote: 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. -- _________ Sean Bailey "Valerie" wrote: 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. -- Valerie |
Thread Tools | |
Display Modes | |
|
|