Lookup Value From Combobox

goju

Registered User.
Local time
Today, 23:20
Joined
Apr 7, 2005
Messages
77
i select john smith from the first combo box, when i go to select london from the second combo box this works as well, however if i change my mind and put in john doe the second combo box sticks and will not put in the correct entry leeds.

im a newbie any help appricated,
 
the file is to big help
 
have you zipped it?
heres an alternate example i ve just made, you can copy and understand the concept.
Chris
 

Attachments

here is the script

SELECT tblClubs.club, tblClubs.Club, tblClubs.ID FROM tblClubs WHERE (((tblClubs.Club)=forms!ikga England membership.Instructor));

any idea whats wrong
 
if you have spaces in your form/control names, surround them with [] i.e. [Forms]![Form Name]![Control Name]
 
goju said:
any idea whats wrong

AS max has said you need to enclose the name of any objects where you use special characters and spaces (never advised, by the way) with square brackets.

Also, you have selected tblClubs.Club twice. Why?
 
SELECT tblClubs.club, tblClubs.Club, tblClubs.ID FROM tblClubs WHERE (((tblClubs.Club)=forms!ikga England membership.Instructor));

why do you have tblClubs.club, tblClubs.Club ?? whats the difference with the lowercase and upper case .Club ?
 
sorry newbie

didnt mean to should be upper case,

does any one have a solution

been on this hours now
 
From reading your initial post this is not a cascading combobox problem.

Have a look at the Combobox Lookup in this example.
 
see attached query, this works but gets stuck if change the name

any ideas going to hang myself
 

Attachments

Open a new form and work through this list. It should help.

  1. Create a new form in design view
  2. Put a combobox on the form
  3. Name the combobox cboInstructors
  4. Set the combo's RowSource to SELECT Instructor, Club FROM tblClubs ORDER BY Instructor;
  5. Set the combo's ColumnCount to 2
  6. Set the combo's ColumnWidths to 2;0
  7. Put a textbox on the form
  8. Name the textbox txtClubs
  9. Set the textbox's Enabled property to False
  10. Set the textbox's Locked property to True
  11. Set the textbox's ControlSource to =[cboInstructors].[Column](0)
  12. Save and close your form as frmExample

Now open your form, pick from the combo, and the textbox will update.
 
Help Newbie Learning

Hi,

tried to do cascading combo boxes think i got it done but now if i change the name in the first box the second box sticks

any ideas (see attached)

second thing is i have a list of names to choose from when i choose form this list i then have the second combo box to choose from

and then in a third box i need a rolling alph numeric number. (i.e KA/1001) that continues from per son to person in each record.

i.e. Tony childs would be TC/1002 Kyle Adders would be KA/1003
and so on.

thank you for you patients
 

Attachments

Users who are viewing this thread

Back
Top Bottom