Solved Some items appear as text while others as integers (1 Viewer)

dawsonrhodes

Member
Local time
Today, 05:27
Joined
Mar 8, 2020
Messages
85
Hey All,

So there are a few things to note about my database - firstly it's a comprehensive database for Employees. One of the issues I am having is with training. I have a form that creates new entries for training (for example, lets say next week I roll out a training/sign off for a Health and Safety Memo) - with this there is an option to automatically add this training to every employee with the status incomplete.

Now there is also a way to manually add training types - for example lets say I add a new employee - I will need to add old training manually as they would not have been included in the auto-adding record. So then I would add them using a dropdown menu and filling out a form.

Now I'll attach an image, but basically, the items added automatically show as text, and any manually entered item shows as an integer. In my reports, they all show as text, which I will also show.

I have no clue why, or how to fix this. I would love to hear some suggestions - I can include the stripped-down database with the affected areas if needed.

Thank you for looking at this post!


1616265715311.png
1616265886738.png
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 10:27
Joined
Jul 9, 2003
Messages
16,271
I would guess that you've got your combobox column property setup incorrectly see my video here for more information

Form with Combo Box Lookup - Nifty Access​

 

dawsonrhodes

Member
Local time
Today, 05:27
Joined
Mar 8, 2020
Messages
85
I would guess that you've got your combobox column property setup incorrectly see my video here for more information

Form with Combo Box Lookup - Nifty Access​

Hello,

I've checked this, they are all correct and the drop downs show text but when manually inputting it saves as an interger.

Thank you for your response - if you would have any other ideas why this may be happening?!
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:27
Joined
Sep 21, 2011
Messages
14,232
No you do not understand.

Please show source for the combos and the data tab properties, plus the source for the report, not the textbox, but the query source.
 
Last edited:

jdraw

Super Moderator
Staff member
Local time
Today, 05:27
Joined
Jan 23, 2006
Messages
15,379
Are you using any Lookup fields in tables? Can you show us some code behind your form and report generation to ensure there isn't code doing/not doing something?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 10:27
Joined
Sep 12, 2006
Messages
15,638
All visible data in a combo box IS text. If you want them as numbers you can do this sort of thing. You need some validation/error checking in case you try to treat a non-numeric value as a number.

Code:
if isnumeric(mycombobox.column(2) then
    mynumber = clng(mycombobox.column(2)
end if

How exactly ARE you handling the combo box value?
 

Users who are viewing this thread

Top Bottom