- Joined
- Jul 12, 2011
- Messages
- 7
- Reaction score
- 0
Basics: I'm running windows 7 (32-bit) with Access 2007
I currently have a Form that will open based on a user entering in a TS # (ID#) and shows various record information…your basic form.
My problem is that I need to open one of several sub forms within this form based on the state of the ID #. I already have code for opening the form based on state…
If [Forms]![Call_Form_1]![State] = "AZ" Then
DoCmd.OpenForm ("Accouting_Form")
DoCmd.GoToControl "TS #"
DoCmd.FindRecord Forms![Call_Form_1]!TS, acEntire, False, , False, acCurrent, True
On Error GoTo 0
‘Call_Form_1 is a quick form I use that shows only the TS# (ID#) and the state, so I do not have to open a larger form, and is programmed to close itself after use.
‘If you can think of a better way of writing this, I’m all for it
My actual problem comes in as I have looked online and tried:
Forms![MainFormName].[SubformName].Value
Or in my case:
Forms![Accounting_Form_AZ]![Acc_Subform]![Accounting_AZ_FC]
But have had no luck.
Any help on this matter would be greatly appreciated
Thank you,
David92595
I currently have a Form that will open based on a user entering in a TS # (ID#) and shows various record information…your basic form.
My problem is that I need to open one of several sub forms within this form based on the state of the ID #. I already have code for opening the form based on state…
If [Forms]![Call_Form_1]![State] = "AZ" Then
DoCmd.OpenForm ("Accouting_Form")
DoCmd.GoToControl "TS #"
DoCmd.FindRecord Forms![Call_Form_1]!TS, acEntire, False, , False, acCurrent, True
On Error GoTo 0
‘Call_Form_1 is a quick form I use that shows only the TS# (ID#) and the state, so I do not have to open a larger form, and is programmed to close itself after use.
‘If you can think of a better way of writing this, I’m all for it
My actual problem comes in as I have looked online and tried:
Forms![MainFormName].[SubformName].Value
Or in my case:
Forms![Accounting_Form_AZ]![Acc_Subform]![Accounting_AZ_FC]
But have had no luck.
Any help on this matter would be greatly appreciated
Thank you,
David92595