Data in table is getting written over

JahJr

Andy
Local time
Today, 07:06
Joined
Dec 3, 2008
Messages
93
I have a form with list boxes and a button.
1. Customer #
2. Sport
3. Team
Button LB
This information gets logged into a table with the following fields.
Customer #
Sport
Team
Bet# "is set to (autonumber)"
PROBLEM
when i close the form and open it back up it always writes over the first row or record, and then continues to add information as LB is clicked. I need it to be impossible for it to write over a record by clicking LB. Any help is greatly appreciated.

Thanks
 
Last edited:
Would you ever use this form to edit an existing data field?

What code underlies the LB control's OnClick event?

The answers to these questions might help us formulate a better answer for you.
 
1. It will never be used to edit an existing data field.

2. Private Sub Command32_Click()
On Error GoTo Err_Command32_Click

DoCmd.GoToRecord , , acNewRec
Exit_Command32_Click:
Exit Sub
Err_Command32_Click:
MsgBox Err.Description
Resume Exit_Command32_Click
End Sub
 

Users who are viewing this thread

Back
Top Bottom