Requery Current Combobox in Continuous Form

DBUserNew

New member
Local time
Today, 13:43
Joined
Sep 12, 2023
Messages
22
Hello Everyone,

Here is the issue. I have two tables (let's say: tbl1 & tblTemp).

tbl1 field:

PKID: AutoNumber
EndDate: Date/Time
etc...

tblTemp fields:
ID: AutoNumber
Dates: Date/Time
PKID: Long (FK)

Then, I have a continuous from (let's say: frmTemp) bound to tbltemp record source. Dates as textbox and cboPK as combobox. The record source of the cboPK is bound to tbl1 (PKID, EndDate).

What I am trying to get is, when I change a record in Dates control, requery the cboPK and show only the records EndDate >= Current date in Dates.

eg:

Current record: 10/31/2023 in Dates. So cboPK show only records >=10/31/2023.
If next row is, 11/3/2023 in Dates, then show only records >=11/3/2023 when I select this record.
so on...

I tried the following, but doesn't work. In cboPK used criteria in EndDate <=Forms!frmtbTemp!Dates. But this apply to entire field not the current record.

How can I reference in cboPK look for >=current date in Dates control and requery ONLY the current cboPK control, not before/after record?

I hope my explanation make sense. Thank you for your time.
 
Thank you MajP for the link. Let me go through that post. Will post my result.
 
If you can post a small example we might be able to assist better.
 

Users who are viewing this thread

Back
Top Bottom