Subform via command Button

tca_VB

Registered User.
Local time
Today, 02:09
Joined
Jul 12, 2007
Messages
24
I would like to open a second form via a command buttom on the main form. I'm avoiding a subform because I don't want it to display until clicking a button.

Main form: frm_Client
Second form: frm_ClientPersonal

In the properties of frm_ClientPersonal I have record source: ClientPersonal (table) and filter: [ClientPersonal]![Client_ID]=[Forms]![frm_Client]![Client_ID]

Then on the command button to open the form I have a macro OnClick to open frm_ClientPersonal with a where condition of [ClientPersonal]![Client_ID]=[Forms]![frm_Client]![Client_ID] and data mode of edit.

My problem - the frm_ClientPersonal opens from frm_Client when I click the button. I can also fill in data. But the data does not save the Client_ID on the record within ClientPersonal so it can't be retrieved a second time.

I'm sure I'm missing something easy, but I can't seem to figure it out.
Thanks for the help.
 
Found the solution:

I was missing the default value in the common field on the subform needs to be set to: =[Forms]![frm_Client]![Client_ID]

Just wanted to share the answer for those who might have been viewing and trying to figure out as well.
 
Thanks for posting back with your solution :)
 

Users who are viewing this thread

Back
Top Bottom