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

On Load Form question

Status
Not open for further replies.

kai023

Technical User
Sep 6, 2005
5
0
0
GB
I have a form (frmAims) that has a list box that the user can use to select records from a table (tblAims). It only contains 3 fields, the dept number (Dept), the dept name (Deptnam) & the aim (Aim).
I need a little bit of code I can drop in to the form load (or form open?)event that will bring the form up with no data in the fields.
I know I have done this before, but can not for the life of me remember / find it.

If anyone can help, it'd be much appreciated.

Many thanks
 
How are ya kai023 . . .

Perhaps the forms [blue]Data Entry[/blue] property is what your after?

Calvin.gif
See Ya! . . . . . .
 
Hi AceMan,

I'm afraid that doesn't work. It clears the form, but when the user then selects a record from the list box it gives an error of 'No Current Record'.

Thanks
 
kai023,

Is this what you're looking for?
Code:
DoCmd.GoToRecord , , acNewRec
Ken S.
 
That's the fella!

Thank you very much. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top