Autonumber field give alphabet instead of number

MushroomKing

Registered User.
Local time
Today, 14:51
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!
 
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.
 
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.
 
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)
 
Sorry, but without a stripped down version of your db or the full code for the relevant part, its impossible to advise
 
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.
 
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.
 
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

Back
Top Bottom