combobox with default selected value (1 Viewer)

alain.roger

Registered User.
Local time
Today, 18:23
Joined
Nov 1, 2014
Messages
18
Hi,

i have 2 tables (clients, frequencies) where in table "clients" i have a column to store ID of "frequencies" table (id, description).

in my form "FClient" i display data stored in table "clients" and i have a combobox that should display the "frequencies" descriptions, but with a frequency selected by default...in fact the one that has its ID stored in table "clients".
i'm able to display all frequencies descriptions but i don't know how to easily select and then display, as default, the frequency stored in table "client"

how can i do that easily ?
thx
 

burrina

Registered User.
Local time
Today, 11:23
Joined
May 10, 2014
Messages
972
Using the Property Sheet you can set the Default value to what you want.
When referring to the value in a query, remember to refer to the Column Number, it starts at o. Example: Me.cboSomeComboBox.Column(1)

HTH
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:23
Joined
Sep 21, 2011
Messages
14,358
The way I have done this is to bind the combobox to the field in the client table and use a select statement in the rowsource.

If you use the wizard, it will do it all for you.

HTH
 

Mihail

Registered User.
Local time
Today, 19:23
Joined
Jan 22, 2011
Messages
2,373
Welcome to AWF.
Access manage itself the ID's if you will use a form (frmClients) that contain a subform (frmFrequency)
 

Users who are viewing this thread

Top Bottom