combo box default value

jalldridge

Registered User.
Local time
Today, 05:08
Joined
May 3, 2005
Messages
60
Hi guys,

I'm obviously doing something stupid in my form :-) If you open the form in the attached sample you will see that I have 2 combo boxes. One of them has a default value showing and the other doesnt, I want to get the second combo to automatically show the value in the list but just cant seem to get this to work...

I cant work out whats different bewteen the two. Been tearing my hair out here so would appreciate some input.

Thanks in advance
 

Attachments

Looks like the default value at the table level is the difference...

???
 
But there is no default value set at the table level.

I dont know if it matters but the combo box that works is set as text at the table level, whilst the combo box that doesnt is set as currency in the table...
 
Hum... titleID is set as default of 1 with required set to true and hourlyRateID is set to 0 with required set to no. Maybe thats it...
 
The default hourly rate id value in the client table should be 1 instead of 0 as there is no 0 in the hourlyrate table...


Edit - Just my humble opinon; The Mr/Ms/Miss table is a bit overkill :)
 
Last edited:
Thanks you sooooo much..... :D Been driving me mad and I never noticed that.

Appreciate your comment about the mr/mrs table. I am just learning and coded this in. Of course defning a list of value for the combo would be better as they can never change :-)
 
Actually, this is bad juju as well - If hourlyRateID 1 ever disappears, you'll hose the system up. Maybe you should dmin() to get it(?)
 
Ok so follow up question then..

Where should I use the dmin()function? If I try and put that in the default value box I get told it has the wrong number of arguments. I cant find this function in the expression builder either?
 
Hum...

I would put:

=DMin("[hourlyRateID]","tblHourlyRate")

In the combo box default value...
 
Ah... I was trying to use it in the default value in in the client table!

Thanks, appreciate your patients.
 

Users who are viewing this thread

Back
Top Bottom