View Full Version : using field in current recordset as query criteria


brother
05-22-2009, 12:25 AM
Hi,

I have a datasheet subform with 4 fields:

[ID]
[Date]
[Customer]
[Location]

The [Location] field is a combo box that use a query as row source. The query use the field [Date] in the datasheet as criteria. The criteria looks like this:

[Forms]![FrmView]![FrmViewSub].[Form]![Date]


So, the problem. The datasheet view shows multiple recordsets, and the query does not know which [Date] to use as criteria.

Any suggestions how I can get the query to use [Date] from the current recordset?

Hope that was clear enough :)

Thanks!!

HiTechCoach
05-22-2009, 05:22 AM
When you change the form's recordset (record source property) to another recordset then you will need to requery the combo box.

How do you switch recordsets?