Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform as Datasheet 1

Status
Not open for further replies.

JoeCool71

Technical User
Jan 22, 2002
13
US
I currently have a subform displayed in a datasheet view. The only issue I'm having is I can't use the docmd.gotorecord or any of the list box controls to gain access to a field or a given record. There is a field I have on the subform wich is a combo box that is pointing to a field on the form. If this record is not filled in after leaving this field then I would like to set focus to this control on this record. I'm able to pull the me.currentrecord, but I can't get back to that record or field.

I'm triggering the error with If IsNull(cboSalesOrder) Then.

Thank you,
Jim Barnes
 
How are ya JoeCool71 . . . . .

You do realize you'll be [blue]stuck at that control until you enter data or close the form?[/blue]

In the [blue]On Exit[/blue] event of the control, copy/paste the following ([blue]you[/blue] substitute proper names in [purple]purple[/purple]):
Code:
[blue]   If Len(Me![purple][b]YourControlName[/b][/purple] & "") = 0 Then
      Cancel = True
   End If[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top