Dale_Anne Kalsow
dkalsow at yahoo.com
Thu May 20 12:08:31 CDT 2010
access is reading [lblDate].[caption] when the form opens. --- On Thu, 5/20/10, Heenan, Lambert <Lambert.Heenan at chartisinsurance.com> wrote: From: Heenan, Lambert <Lambert.Heenan at chartisinsurance.com> Subject: Re: [AccessD] Requery a query To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Date: Thursday, May 20, 2010, 11:49 AM How does lblDate.Caption get into the source query qryrptJobs? This posted SQL has no reference to any form, so presumably you have some reference to the form in qryrptJobs. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale_Anne Kalsow Sent: Thursday, May 20, 2010 12:37 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Requery a query Sure - the sql code in my query is: SELECT qryrptJobs.JobNumber, qryrptJobs.JobDescription, qryrptJobs.JustScheduledStartDate, qryrptJobs.JustScheduledCompletationDate, CDate([lblDate].[caption]) AS Expr1 FROM qryrptJobs WHERE (((CDate([lblDate].[caption])) Between [JustScheduledStartDate] And [JustScheduledCompletationDate])); Thanks! Dale --- On Thu, 5/20/10, Heenan, Lambert <Lambert.Heenan at chartisinsurance.com> wrote: From: Heenan, Lambert <Lambert.Heenan at chartisinsurance.com> Subject: Re: [AccessD] Requery a query To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Date: Thursday, May 20, 2010, 11:21 AM The answer may well depend on how you retrieve the value the first time around. Can you post the SQL/code? Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale_Anne Kalsow Sent: Thursday, May 20, 2010 12:18 PM To: Access Developers discussion and problem solving Subject: [AccessD] Requery a query Good Morning, I have a query that supports a combo box. Part of the underlaying query gets a value from a label on its form. The query works great when the form is open - it returns (uses) the correct value. My problem is when I change the value stored in the label (through code) and tell the combo box to do a requery (me.Combo0.Requery). It does it but the new value of the label is not used but rather what the data was in the label when the form was reopened. Does anyone know how to tell the combo box's query to go and reread the value in the label? thanks! Dale -- 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 -- 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