O
ostermanp
Guest
I have database1 which uses a table (Part Number/Description Table) linked from database2 to populate a combo box and a text field. The table in database2 includes part number (column(0)) and description (column (1)). Database1 has a combo box named Rosen PN which displays the part numbers and descriptions from a query (Part Number/Description Query) based on the table from database2.
In the AfterUpdate event for the combo box I have the following:
Private Sub Rosen_PN_AfterUpdate()
Me.Rosen_PN = Me.Rosen_PN.Column(0)
Me.Description = Me.Rosen_PN.Column(1)
End Sub
When choosing a part number from the list in the combo box everything works fine and both the Rosen PN combo box and the Description text box are filled in correctly.
My problem is if I try to enter a new part number using the keyboard into the combo box when I hit enter I get the following error message:
Run-time error '-2147352567 (80020009)'
The Field 'FAI Tracking.Rosen PN' cannot contain a Null value because
the required property for this field is set to True. Enter a value in this
field.
In the properties for the combo box "Limit to list" is set to No.
I should tell you that if you hit "End" on the error message box it will allow you to finish entering all of the information in the field and save the record.
Is there a way to be able to enter a number not in the list without getting the error message?
Paul
In the AfterUpdate event for the combo box I have the following:
Private Sub Rosen_PN_AfterUpdate()
Me.Rosen_PN = Me.Rosen_PN.Column(0)
Me.Description = Me.Rosen_PN.Column(1)
End Sub
When choosing a part number from the list in the combo box everything works fine and both the Rosen PN combo box and the Description text box are filled in correctly.
My problem is if I try to enter a new part number using the keyboard into the combo box when I hit enter I get the following error message:
Run-time error '-2147352567 (80020009)'
The Field 'FAI Tracking.Rosen PN' cannot contain a Null value because
the required property for this field is set to True. Enter a value in this
field.
In the properties for the combo box "Limit to list" is set to No.
I should tell you that if you hit "End" on the error message box it will allow you to finish entering all of the information in the field and save the record.
Is there a way to be able to enter a number not in the list without getting the error message?
Paul