Access MS Access DLookup

Joined
Jan 2, 2010
Messages
2
Reaction score
0
I have a Dlookup macro that fills in an Item Number when a product is chosen on a purchase order form. It works fine as long as the Item Number is only numbers. If there is a letter or other character in the product ID then I get the message:

"You tried to run a Visual Basic procedure to set a property or method for an object. However the component doesn't make the property or method available for automation operations."

Here is the current macro:

Item: [Forms]![Open POs]![PO Items]![PO Item Number]
Expression: =DLookUp("[Item Number]","[Enter Items]","[Item]=Forms![Open POs]![PO Items]![PO Item]")

Can anyone help?
 
Joined
Feb 25, 2010
Messages
16
Reaction score
0
If you are allowing alpha characters to be entered in a field, the field should be character type. If the fields are not the same data type, cast the querying field to match database field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top