Clearing data on my Customer Details form (1 Viewer)

peterb

Registered User.
Local time
Today, 03:10
Joined
May 4, 2001
Messages
12
I know I shouldn't really ask two questions so close together but . . .

I have got a form called EDIT CUSTOMER DETAILS which is linked to a CUSTOMER table. Is it possible to have a button that clears the form a data and makes it ready for a new customers data to be entered? One of the fields is CUSTOMER ID, which I have currently got as an autonumber and so would like the button to position this accordingly.

Any ideas would be greatly appreciated.
 

KevinM

Registered User.
Local time
Today, 03:10
Joined
Jun 15, 2000
Messages
719
cmdButton OnClick()

Me.DataEntry=True
[FieldName].SetFocus

Not sure what you mean by "position" to ID field. If you mean set focus then there is no need to do this as it is an Autonumber field. Instead setfocus to the next field.
 

KevinM

Registered User.
Local time
Today, 03:10
Joined
Jun 15, 2000
Messages
719
MORE INFO...

You can use the same button to put the form back into EDIT mode (show all records) like this....
Use "Add Record" as the caption for the button (no quotes)

cmdbutt_Click()
If cmdbutt.Caption="Add Record" Then
Me.DataEntry=True
cmdbutt.Caption="Edit Record"
[Field].SetFocus
Else
Me.DataEntry=False
cmdbutt.Caption="Add Record"
End If

That's better !
 

Users who are viewing this thread

Top Bottom