I have a little problem...I have a Combo box that has a list of employees in it and when a certain employee is chosen i would like the following two text boxes to update to show the licences that that employee holds. Thanks for the help!
The RowSource of the combo box is a row in a Query that has all the employees names.
The record source is a table called tblOICMain where everything is listed
the names are EmployeeName(comboBox), WaterTreatmentLevel(textbox) and WaterDistributionLevel(textbox)
the licence information is stored in a table called tblEmployeeTickets.
The relationship has not been developed because that is where i think i am having most of the problems
Gosh BT24 - you really like keeping people guessing don't you.
By What is the RowSource / RecordSource, I meant what is the ACTUAL SQL Code. I was expecting
"SELECT ... FROM ... ON .. WHERE ... " in each case
Anyway - lets see how far we can get with a few guesses/recommendations
WaterTreatmentLevel and WaterDistributionLevel are UNBOUND? text boxes ?
The combo box ( Called cboPickEmp ) has 5 columns which are
EmployeeId
EmployeeFirstName
EmployeeSurname
WTLLicence
WDLLicence
Then in the comboBox's AfterUpdate event put the following code
Private Sub cboPickEmp()
WaterTreatmentLevel = cboPickEmp.Column(3)
WaterDistributionLevel = cboPickEmp.Column(4)
End Sub
sorry about not giving you the right info. but i think that the information that you gave me will help. i have no sql statment so i guess thats why i didnt give you one. and the text boxes are bound to the table. thanks for all the help
Once again thanks for the help, olay the text boxes are no longer bound. but the Combo box is bound to a query. i dont know if that help. i am sorry for being so vague.
Lets see if i can give you more info. The form looks like this: The Fields are like this EmployeeName (combo box)bound to SELECT DISTINCTROW [qryEmployeeName].[Name] FROM [qryEmployeeName];
then there are two text boxes that are named WaterTreatmentLevel and WaterDistributionLevel respectively.
then there are two other text boxes one is OITTime for the amount of time that an employee is on-call. the last text box is the date. The date is there for Report purposes. the text boxes are all unbound the combo box is bound. The form is saved in a table called tblOICMain. i hope that this helps it all i can think of
Okay what i did is put all the information in the columns and it is working but it will not let me have a null value in the fields and some of the operators dont have certain levels. so now how do i make it accept having a null value?
Okay what i did is put all the information in the columns and it is working but it will not let me have a null value in the fields and some of the operators dont have certain levels. so now how do i make it accept having a null value?
The Fields are like this EmployeeName (combo box)bound to SELECT DISTINCTROW [qryEmployeeName].[Name] FROM [qryEmployeeName];
No, No, No
FIELDS are found in TABLES.
The things that you see on forms are CONTROLS
A combo box control is BOUND to a FIELD in a table via the fieldname in the CONTROL SOURCE property.
The SELECT statement that you have there is, I suspect, in the ROW SOURCE property.
The ROWSOURCE defines what data populates the dropdown list part of the combo box. It does NOT define what the combo box is BOUND to.
The form is saved in a table called tblOICMain
No, No, No
The FORM is saved in the DATABASE
The data that you see on the form may well be Saved in a table called tblOICMain.
However, if that is the case then what is qryEmployeeName doing ?
The use of qryEmployeeName inside the combo box ROW SOURCE seems a total waste of time.
SELECT DISTINCTROW [Name] FROM [tblOICMain];
would seem to do perfectly well.
G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D
Thanks
The reason that i used the qryEmployeeName is because, the qry is bound to a Report for lookup purposes and it was just easier to use it then to make a new query and change all the setting on the Criteria Lookup form and the report. thats all. i thank you for your help but what do i do about having Null Values in the Columns?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.