Link to home
Create AccountLog in
Avatar of cres1121
cres1121

asked on

Datamismatch when doing a VBA Event in Access

I want to pass a variable when I double click on a form to open another form.  

 Line item number is a auto number with long integer on one table.

On the second table it is number with long integer.

When I created the double click event when I am on line item number

Private Sub line_item_number_DblClick(Cancel As Integer)
DoCmd.OpenForm "TBLservicelinedetails", WhereCondition:=" [line item number] = '" & Me.[line item number] & "'"
End Sub

Run time error 3464
Data type Mismatch in criteria expression....
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of cres1121
cres1121

ASKER

Perfect.  How do I make it a popupform?    So when I double click it will just be a little popup?
Append the dialogue parameter:

DoCmd.OpenForm "TBLservicelinedetails", acNormal, , "[line item number] = " & Me![line item number].Value & "", acFormEdit, acDialog

Open in new window

/gustav
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Wonderful.. I knew the pop up was easy just could not remember and he got my event to work.
Thank you!