Bobby Heid
bheid at appdevgrp.com
Tue Oct 11 14:49:32 CDT 2005
If I understand your problem, you are getting data from the combos that you are not expecting. I assume that the data in the combo box is id, then the display data, correct? If so then try something like: cboTOType.column(1) 'zero based, choose the 2nd column I do not have Access up at the moment, so it is either column or columns. Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Clark Sent: Tuesday, October 11, 2005 3:07 PM To: accessd at databaseadvisors.com Subject: [AccessD] In the meantime...simple syntax question I just posted, what I believe to be, a difficult question. But, in the meantime, allow me to pose something that should be quite a bit easier. I have a label on my form, which I am using to notify the user exactly what is being queried. The problem, if you could even call it a problem, is that if you filling in following data: txtEmpNum = "10080"; cboTOType = "Vacation"; cboMonth = "June"; and txtYr = "2005" you will get the following string in the label, "lblSummary" "This data represents all v time taken, for employee 10080, for JUN, 2005" and I would like it to say, "This data represents all Vacation time taken, for employee 10080, for June, 2005" The following is the code snippet that I am doing this with: 'Set summary text to let user know exactly what is being queried SummaryText = "This data represents all " & cboTOType & " time taken, for employee " SummaryText = SummaryText & txtEmpNum & ", for " & cboMonth & ", " & txtYr lblSummary.Caption = SummaryText And I tried changing it to: 'Set summary text to let user know exactly what is being queried SummaryText = "This data represents all " & cboTOType.SelText & " time taken, for employee " SummaryText = SummaryText & txtEmpNum & ", for " & cboMonth.SelText & ", " & txtYr lblSummary.Caption = SummaryText i.e. Adding ".SelText" to the two combo box control calls but then I get, "You can't reference a property or a method for a control unless the control has focus" <snip> John W Clark