Combo Box - Value not valid Error (1 Viewer)

sargturner

New member
Local time
Yesterday, 20:02
Joined
Oct 18, 2011
Messages
7
Hello Access-Programmers.co.uk!

I have a combo box on my form...

I used the cb wizard to link the data from my Date Table to the cb...

My form is based off a query that links Employee names with dates

My Date table has the type of entry as a short date

When I click on my drop box all of my dates appear and all is well it is when i click on another date to change (update the date for that specific employee) I get the following error...

"The value you entered isn't valid for this field."

Please help! =]

ps Im a novice when it comes to writing vba so if your going to post some code please either explain where to put it and such thanks! =]
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:02
Joined
Jul 2, 2005
Messages
13,826
This error usually means your "bound" column DataType does not match the ControlSource field DataType. Could this be true in your case?
 

vbaInet

AWF VIP
Local time
Today, 01:02
Joined
Jan 22, 2010
Messages
26,374
Hello sargturner!

I suspect that your combo box is trying to save the ID which is a Number type, whereas it expects a valid date. If you look in the Row Source you may find two fields in the query. The bound field is what is saved, and the bound field in your case is the ID.

Edit: 3 mins late on my part. RuralGuy got here before me ;)
 

sargturner

New member
Local time
Yesterday, 20:02
Joined
Oct 18, 2011
Messages
7
I think you guys are right... hmm... I have my query based off my link table...
I suppose I could base my cb off my the Date in my query.. but then it would should duplicates.. if I base it off my link table it is going to show the IDs... any suggestions here? I just want it to show the date... is there a way to convert the date to its ID? I'm going to try and make it a combo box based off the ID and the date and then just hide the ID column... we'll see thanks for the help and fast replies!
 

sargturner

New member
Local time
Yesterday, 20:02
Joined
Oct 18, 2011
Messages
7
Yeah that is my exact problem... based my cb off my query so I would show the dates instead of IDs and it works great... butt theres still the problem of duplicates..
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:02
Joined
Jul 2, 2005
Messages
13,826
Do you know about the DISTINCT key word?
 

Users who are viewing this thread

Top Bottom