[AccessD] In the meantime...simple syntax question

John Clark John.Clark at niagaracounty.com
Wed Oct 12 09:56:09 CDT 2005


Thanks again guys and gals! I always neglect the .column(?) option...one
of those things I had read about and "knew" of, but I've never used it
before, so I tend to forget it. I just added ".column(1) to both the
combo controls and it worked like a charm. Actually, I don't think I
needed it for the Month field because it was a value list that I type in
and it seemed to be fine by default...I'll check this out later, because
I don't really understand it.

John W Clark

>>> stephen at bondsoftware.co.nz 10/11/2005 3:41 PM >>>
John,
Does the RecordSource of the cboTOType combo have more than one field? 
The code looks like it is displaying the bound field (v) and you want it
to display the combo's displayed field.  If this is the case you might
need to do this: 

SummaryText = "This data represents all " & cboTOType.Column(n) 

where n is the column ( zero-based) of the field you want to  display
in the RowSource of the combo

Just a WAG

Stephen Bond



> -----Original Message-----
> From: John Clark [mailto:John.Clark at niagaracounty.com]
> Sent: Wednesday, 12 October 2005 8:07 a.m.
> 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"
> 
> OK...now what? Any ideas? The only one I've got in my head right
now,
> is to set up parameters to send to the function that does 
> this, but they
> would have to be global...so maybe I add the code snippet 
> above to each
> of the field's "AfterUpdate" event and do it there? Again...any
ideas?
> 
> Thanks again. I'm flustered and going home for the night. I've got a
> headache and I've gotta stop at the pet store and buy crickets for
my
> son's anoles...spelling?..."lizards." Then, I've got to stop by the
> football field and pass on the stats from last game. Is 4:00 PM too
> early to go to bed?
> 
> Tomorrow is a new day...and hopfully a much better one ;)
> 
> Take care all! 
> 
> John W Clark     
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd 
> Website: http://www.databaseadvisors.com 
> 
-- 
AccessD mailing list
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list