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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remain on field if null or 0 entered in datasheet view 1

Status
Not open for further replies.

ftook

Programmer
Dec 4, 2006
80
GB
I have a subform in datasheet veiw and need to remain on the input field / record if null or zero is entered, the problem ive got is that if i press enter the control moves to next field and if i press up/down arrow the control moved to same field but next/previous record and even if the mouse is used to select another record the control should remain on that record and field.
 
How are ya ftook . . .

In the [blue]On Exit[/blue] event of the control try:
Code:
[blue]   If IsNull(Me!CoName) Then Cancel = True[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Hi TheAceMan1,

That solution is superb, thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top