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
|
|||
|
|||
More on tabbing to a field in a subform - Access 2000
The following works fine in reference to a field on the Master form Forms!Fclient_and_sub!Cname.SetFocus But when I reference a field on the sub form from the Master form the following doesn't work. Private Sub Info_Exit(Cancel As Integer) Forms![FCldetail_subform]!Status.SetFocus End Sub I get the message that the subform does not exist. Again any help would be much appreciated. Abay |
#2
|
|||
|
|||
The right syntax to refer to field in the subform will be
Forms![MainFormName]![SubFormName].Form![FieldName].SetFocus And if you refer from the main form Me.[SubFormName].Form![FieldName].setFocus -- In God We Trust - Everything Else We Test "Abay" wrote: The following works fine in reference to a field on the Master form Forms!Fclient_and_sub!Cname.SetFocus But when I reference a field on the sub form from the Master form the following doesn't work. Private Sub Info_Exit(Cancel As Integer) Forms![FCldetail_subform]!Status.SetFocus End Sub I get the message that the subform does not exist. Again any help would be much appreciated. Abay |
#3
|
|||
|
|||
Thanks for your reply ... I have the following code in the "on exit" event
of my last field on the Master form: Me.[FCldetail_subform].Form![Status].SetFocus No error message, but the focus goes to the first field on the Master. Just about ready to give up on this .. many thanks again for your help. Abay "Ofer" wrote in message ... The right syntax to refer to field in the subform will be Forms![MainFormName]![SubFormName].Form![FieldName].SetFocus And if you refer from the main form Me.[SubFormName].Form![FieldName].setFocus -- In God We Trust - Everything Else We Test "Abay" wrote: The following works fine in reference to a field on the Master form Forms!Fclient_and_sub!Cname.SetFocus But when I reference a field on the sub form from the Master form the following doesn't work. Private Sub Info_Exit(Cancel As Integer) Forms![FCldetail_subform]!Status.SetFocus End Sub I get the message that the subform does not exist. Again any help would be much appreciated. Abay |
#4
|
|||
|
|||
Thank you so much for your help ... this is what finally worked
Me!FCldetail_subform.SetFocus Me!FCldetail_subform.Form!Status.SetFocus Supplied by Rural Guy ... again thank you for your help. Abay "Abay" wrote in message ... Thanks for your reply ... I have the following code in the "on exit" event of my last field on the Master form: Me.[FCldetail_subform].Form![Status].SetFocus No error message, but the focus goes to the first field on the Master. Just about ready to give up on this .. many thanks again for your help. Abay "Ofer" wrote in message ... The right syntax to refer to field in the subform will be Forms![MainFormName]![SubFormName].Form![FieldName].SetFocus And if you refer from the main form Me.[SubFormName].Form![FieldName].setFocus -- In God We Trust - Everything Else We Test "Abay" wrote: The following works fine in reference to a field on the Master form Forms!Fclient_and_sub!Cname.SetFocus But when I reference a field on the sub form from the Master form the following doesn't work. Private Sub Info_Exit(Cancel As Integer) Forms![FCldetail_subform]!Status.SetFocus End Sub I get the message that the subform does not exist. Again any help would be much appreciated. Abay |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Form, Subform, Tab key | 2nd_Stage_User | Using Forms | 17 | August 25th, 2006 12:30 AM |
Re-format inherited EXCEL data from 1 field to 3 fields in ACCESS | Doug | Database Design | 1 | February 21st, 2005 09:50 PM |
transpose | john | Using Forms | 1 | November 24th, 2004 06:16 PM |
Images in a database | Franz | General Discussion | 10 | October 7th, 2004 09:35 AM |
Upload Image | Jason MacKenzie | General Discussion | 1 | September 1st, 2004 04:38 AM |