J G
asked on
tab to another sub form
I have a continuous sub-form that is designed to look like a datasheet sub-form. the bottom record of the sub-form is always blank (because it is a potential new record). I want to make it so if a user tabs thru this blank record it will set focus on another subform's field.
The first field in the record is a combobox. I was trying to test if the combobox was null, but nothing happens. Below is my vba. How can I fix?
Private Sub Cost_LostFocus() 'sets focus to sub_store_item sub form
If Me.VendorNameCombo = Null Then
Forms!Item_Master!Sub_Stor e_Item!cbo Current_Ve ndor_Item. SetFocus
End If
End Sub
The first field in the record is a combobox. I was trying to test if the combobox was null, but nothing happens. Below is my vba. How can I fix?
Private Sub Cost_LostFocus() 'sets focus to sub_store_item sub form
If Me.VendorNameCombo = Null Then
Forms!Item_Master!Sub_Stor
End If
End Sub
use this
Forms!Item_Master!Sub_Stor e_Item.FOR M!cboCurre nt_Vendor_ Item.SetFo cus
Forms!Item_Master!Sub_Stor
ASKER
Forms![Item_Master]![Sub_S tore_Item] .Form![cbo Current_Ve ndor_Item] .SetFocus
gives the following error:
Microsoft Access can't find the field Sub_Store_Item referred to in your expression.
gives the following error:
Microsoft Access can't find the field Sub_Store_Item referred to in your expression.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
This will work only if there is some code behind in the subform....if there is not...then just open the VBE for design view of the subform...