On previous form I was able to add a combo box to a subform. However this time I have encountered a new problem. The problem is more records are involved in my current subform.
The first combo Box/subform I created it was ok to use the DlookUp function because the record count was on average 2 records. But now my record count on average 10 records. I am getting the following error msg.
Run-time error '6
Overflow
Here is my code:
Private Sub Command150_Click()
Dim src As Integer
src = DLookup([MAWBID], "HAWB_Imports", "MAWBid = " & Me.MAWBID)
'This updates the combo box of my subform
Me.Combo158 = src
Me.Combo158.Requery
'This makes the combo box, subform and main form equal
Combo158_AfterUpdate
End sub
I tried a CLng function but couldn't get it to work (it could have and probably was me).
Does anyone have any suggestions?
Thank you
The first combo Box/subform I created it was ok to use the DlookUp function because the record count was on average 2 records. But now my record count on average 10 records. I am getting the following error msg.
Run-time error '6
Overflow
Here is my code:
Private Sub Command150_Click()
Dim src As Integer
src = DLookup([MAWBID], "HAWB_Imports", "MAWBid = " & Me.MAWBID)
'This updates the combo box of my subform
Me.Combo158 = src
Me.Combo158.Requery
'This makes the combo box, subform and main form equal
Combo158_AfterUpdate
End sub
I tried a CLng function but couldn't get it to work (it could have and probably was me).
Does anyone have any suggestions?
Thank you