Query with a default value

DubaiDave

Registered User.
Local time
Tomorrow, 01:23
Joined
Nov 25, 2008
Messages
69
Hi,

I have a form based on query. I want the form to open to show all records with the default ProjectID value (listed in another table). Then once the form is open, I want the user to be able change the ProjectID using a combo on the form. The combo loads with the default value.

I started with [tbRFIs]![ProjectID]=[Forms]![fmViewRFI]![txtProjectID] with criteria 'True'.

But, it yields a blankscreen, probably because the cbo is not populated until form is open?

So how do I tell a query to use the defaultID listed in another table first and then once the form is open, get it from the cbo box on the form?

I am a bit stuck on this one.

David
 
On the other hand "chapter and verse" isn't required, if you write to much, then no ones going to read it! I actually sometimes find it easier to help people that don't know what they want, because I can "sort of" lead the conversation with selected questions.

Uncle, you are right – I find it hard to ask the right question using the right terminology. I will try again…

I want to open a Form such that records are filtered based on one field matching that stored in another table (ProjectID).

So the form opens and records are filtered based on:

[tbRFIs]![ProjectID]= DLookUP(“[Value]”, “tbDefaults”, “DefaultID=1”) Criteria True

On the form there is a Combo cboProjectID and I want the user to be able select from all possible ProjectIDs and then the form should requery based on the value chosen.

So the query would now include something like:

[tbRFIs]![ProjectID]= Forms.MyForm.cboProjectID Criteria True


How do I open a form based on a value ‘outside’ of a form (in another table) and then once the form is open, requery on a value on the form?

Dave
 

Users who are viewing this thread

Back
Top Bottom