Forum Discussion
Custom Auto-number field data type problems
is your custom "Student ID" field really an Autonumber (long) field and just prefixing it with "ATD" on your form.
on your "Student Grade" table, you need to make the "Student ID" as Long (numeric).
then for the lookup, create an Expression on the Query.
see this demo. open each table in design view and see the Datatype of Student id and
the Lookup query.
open Student Grade table and enter some data on Student ID.
as a programmer you know exactly what is the purpose of this field, don't get astrayed.
- MprovostJul 26, 2022Copper Contributor
Thank you for responding to my post. I compared the tables in your demo database to the tables in my database and all the Properties are the same. So I don't think there is a problem with either of the tables. I think the problem is somewhere in my form.
You suggested "for the lookup, create an Expression on the Query". If you're referring to the properties for my form, I will need more guidance, as you did not include a form in your demo. Should I use the Expression Builder somehow in the Property Table of my form or build my own. Is this even what you're referring to? So sorry for the lack of understanding, but as I mentioned, I am REALLY new at this. I have attached a screen shot of my form in the design view with the Properties Table open. Any further help would be appreciated.- arnel_gpJul 27, 2022Iron Contributor
if you will open the "Student Grade" table in design view, click on student id, and on the Lookup
you will see the Expression i made.also i created a query based on this table and join with Student table to show the student name.
next created a form from this query.
if you will follow the same SQL in your form then you will have success on it.
you don't really need to separated this Student id into two fields?
because on each records you will have same info on one field that is "ATD", which will break first Normalization rule.
also this is Identifiier, so unlikely it will involved in any mathematical computation.