Select all in Combo box (1 Viewer)

Steve_T

Registered User.
Local time
Today, 19:00
Joined
Feb 6, 2008
Messages
96
Hi, i have looked on the forum for this and i am slightly confused as it look like either you need to add a module to preform this action or a Union Select Query?? and i am not sure if i am looking at the correct Posts.

What i am trying to do is on a form with a Record source called 'tblEmployee. I have a Combo box called 'cboShift' The Combo box's Row source is taken from tblShift which lists all the shifts which in turn is linked to tblEmployee[Shift].
I want to add the word "All" to tblShift so when it is selected the form will show all records across all shifts when the form updates.

I would be very great full for any help
 

Kiwiman

Registered User
Local time
Today, 19:00
Joined
Apr 27, 2008
Messages
799
Howzit

I have always used a union query. This appproach requires two fields in each query of the Union.

Something like the below

Code:
SELECT tblShift.yourfield,tblShift.yourfield FROM tblShift
Union
SELECT "*", "<ALL>"
FROM tblShift


The part after the Union inserts the wildcard in the bound column and the word "<ALL>" in the second. The "<ALL>" also ensures it is at the top. No need to insert into the table itself.

make the default value of the combo "*"
the column count 2
the bound column = 1
 

Steve_T

Registered User.
Local time
Today, 19:00
Joined
Feb 6, 2008
Messages
96
Option, Thanks for replying, as soon as i start work later i will post a copy of the Database as i work nights.
 

Steve_T

Registered User.
Local time
Today, 19:00
Joined
Feb 6, 2008
Messages
96
Kiwiman,
As soon as i get to work i will try this, either way i will get back to you.
Thanks for taking the time to help me.
 

Users who are viewing this thread

Top Bottom