Autonumber field give alphabet instead of number (1 Viewer)

MushroomKing

Registered User.
Local time
Today, 06:58
Joined
Jun 7, 2018
Messages
100
Hi guys!

This is a new one for me. Could anyone explain why this is happening?

I have a table with a autonumber field for ID.
I use this ID as a counter on another form.
This works fine!

But when i want to use this value in a query expression (fetching it from the form field), i get letters instead of numbers in my query!.

What could be the issue here? Thanks in advance guys!
 

isladogs

MVP / VIP
Local time
Today, 13:58
Joined
Jan 14, 2017
Messages
18,186
Are you using a lookup field at table level?
 

MushroomKing

Registered User.
Local time
Today, 06:58
Joined
Jun 7, 2018
Messages
100
Hi Ilsa. Thanks!

No i am not.
I add a new record in vba to the table,
this result is visable on the form,
then for ease of use, i just take the value on the form into my query.

I know sounds a bit around the clock, but it's fine i guess.
 

jdraw

Super Moderator
Staff member
Local time
Today, 09:58
Joined
Jan 23, 2006
Messages
15,362
Can you show us the code involved, or post a copy of the database in zip format? Make sure you remove/anonymize anything private and provide instructions on how to cause the issue.
 

MushroomKing

Registered User.
Local time
Today, 06:58
Joined
Jun 7, 2018
Messages
100
Thanks man. Sure!

session: [Forms]![session_counter]![ID]

this is in my query.

(to narrow down the database and zip it is really too much work in this case :D)
 

isladogs

MVP / VIP
Local time
Today, 13:58
Joined
Jan 14, 2017
Messages
18,186
Sorry, but without a stripped down version of your db or the full code for the relevant part, its impossible to advise
 

jdraw

Super Moderator
Staff member
Local time
Today, 09:58
Joined
Jan 23, 2006
Messages
15,362
session: [Forms]![session_counter]![ID]

this is in my query.

No, that is only 1 piece of your query.
If anyone is to help, you'll have to provide context.

But if you're happy with the situation, great.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 08:58
Joined
Feb 28, 2001
Messages
26,999
Is it possible that you are working with a combo/list box? I re-read the thread twice but didn't see what kind of control you were using.

The default property returned when naming a control in VBA is .Value but that doesn't tell you from which column of the combo that value originated. (Other properties do that.) If you are working with any kind of multi-column control, I could expect that behavior.
 

MushroomKing

Registered User.
Local time
Today, 06:58
Joined
Jun 7, 2018
Messages
100
Ah i see. Sorry!

The dumb thing about this is that i continued building, and the query is now an append query. (in my head i would fix this problem later)

But now, it works...

It appends and the number shows up in the table...
Very strange.

To clarify, the field i got the value from, was a normal text field. Nothing special.
 

Users who are viewing this thread

Top Bottom