Use autonumber field from form in query

rheide

Registered User.
Local time
Today, 10:25
Joined
Jun 12, 2002
Messages
32
Hello All,
I have searched and can't seem to figure this one out.

I have a form with subforms, etc.
There is a field on one of the subforms which happens to be an autonumber field.

I am trying to run a query that uses that field as the criteria. For right now, I'm just running the query "outside" the form, but while the form is open.

My query references the field like this:
DBOrderID: [Forms]![frmSelCustomers]![frmOrders].[form]![OrdID]
Typically I have to do trial and error to make sure my code is right and I changed the OrdID to another field on the form and it works fine.

Anyway, when I run the query, I get strange characters in the place of OrdID. Here are examples of the characters I get and the OrdID that is on the form.
78581 = ㋵
91714 = 時
97088 = 筀
FYI - the OrdID is already on the form (not like its trying to create a new autonumber at the same time).

I tried changing the Format on query field to general number but that didn't do anything.

SO, my question .... should I be able to reference an autonumber field?
If so, any suggestions what I'm doing wrong?

Thanks in advance!!
 

Users who are viewing this thread

Back
Top Bottom