new record combo box problem?

surfdragon

Registered User.
Local time
Today, 05:19
Joined
Jan 26, 2016
Messages
15
Hi, I am new to databases and VB so please be gentle with me !!! Sorry for the long question.....

I have created a database with a form and all works as advertised - great.

BUT, when i go to the next record it leaves the previous selection from the combo boxes in the new record?????

I found some coding which should allow me to clear the form when new record is selected, but I can't get it to work and I dont understand VB so am trying to learn on thejob. Is this code the best way of dealing with this or do I need a different solution
Code attached:

Private Sub Form_Current()
On Error Go to ErrorHandler

Me![cboname of box]= Null

ErrorHandlerExit

Exit Sub







ErrorHandler:

MsgBox "Error No: " & Err.Number &": Description: " & Err.Description

Resume ErrorHandlerExit

End Sub

Any help would be greatly received
 
you have the combo BOUND to the field.
if this is a filtering combo, dont assign it to a field.
 
Thanks for the reply.
The Combo box is unbound at present, and the combo box is just a standard drop down box.
 
your code should work. is there a subform on your form?
 

Users who are viewing this thread

Back
Top Bottom