Move data from main form to one of 3 subforms

kbrooks

Still learning
Local time
Today, 06:44
Joined
May 15, 2001
Messages
202
I think I'm trying to make this harder than it really is, I'll see what you think.

I have a main form (PatientForm) with an autonumber (ID), account#, patient name and type. Their answer in the "Type" field brings up one of 3 pop-up forms. (Either Charges, Payments, or Balance Transfers). I'm not sure if you'd consider a pop-up form a subform so in searching past threads I wasn't sure what applied.

My question(s):
1. First of all, IS a pop-up form considered a subform? I wasn't sure if a subform by definition was nested into the main form.
2. I have an autonumber for each of the pop-up forms (each in their own tables with the names I mentioned above) that I called NewID. I also have an ID field that I ASSUME needs to correspond with the ID on my main form. Is that correct?
3. If that is indeed correct, how exactly do I do that? I plugged in =[Forms]![PatientForm]![ID] for the control of the ID on the pop-up form. But it didn't like that and I got the #Name? error.

Am I going about this even remotely correctly?
TIA
 
The control source should be the field that you are storing the ID in your subtable.

Set the default value of the textbox of your popup form to be =[Forms]![PatientForm]![ID]

Depending on how you want the popup form to act, you may also need to set the filter of your popup form to only show records where ID = [Forms]![PatientForm]![ID].
 
Thanks for the information, Pat! I will play with that today and get it working.

Another question....do you think it wiser to go with a subform, as opposed to the pop-up forms I currently have? I'm not sure if there's really an advantage one way or another, but I'm sure able to find a lot more previous threads on the subform topic.
 

Users who are viewing this thread

Back
Top Bottom