RE: Pass a variable to a query but not with textbox

Tech-Archive recommends: Fix windows errors by optimizing your registry



I've had the same issues..

My work-around that I use in almost ALL my databases is a lookup table. In
this table I'd have a lookupType field (essentially a 'variable' name) and
then another field for the actual value..

you can then write functions that query the lookup table based on LookupType
(variable name), and use them to read and write values to the table.

"Seth" wrote:

> I am using a form to gather information which is used to perform a query.
>
> Up until now I have placed the information in textboxes, and then referred
> to the textbox in the criteria section of the query. eg.
>
> Between [Forms]![fdlgReportsByModelAndDate]![txtBeginningDate] And
> Forms]![fdlgReportsByModelAndDate]![txtEndDate]
>
> I don’t want to use a textbox to pass information to the query. I want to
> pass data directly from a variable (varEndDate) to the query.
>
> Is this possible?
>
> Thanks,
> Seth
>
.



Relevant Pages

  • Re: Basic Question for Lookups.
    ... However, especially in the early phases of setting up your Tables, you will probably need at times to look at their contents, and if so, you probably will want to define lookup properties on the foreign keys. ... The Query that I would suggest is similar to what the Lookup Wizard defines, except that I give mine a name, and I limit it to 2 fields instead of several. ... 1801550689 Michael Zachary Jackson ... I'm properly storing Prospect ID pk then FirstName then Middle then Lastname fields.etc. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Tip: Table design and query for bracketed lookup
    ... WHERE [Enter Bracket:] ... No rows would be returned by the query! ... If the "lookup" value is in a column of your query called Lookup, ... FROM RateTable RT1 ...
    (microsoft.public.access.queries)
  • Re: WHERE statement
    ... with basically all the info going to one table, except now the suppliers, ... "Jeff Boyce" wrote: ... and you can still use a combobox to list the lookup values. ... I know I get the ID field if I query against a 'lookup' ...
    (microsoft.public.access.gettingstarted)
  • Re: Understanding what makes Access tick
    ... > Query, but which is the subject of a table's lookup relationship. ... allow any "main" record..and "maybe" a child record. ... want here is a simply list of tasknumbers. ...
    (microsoft.public.access.gettingstarted)
  • Re: WHERE statement
    ... "Jeff Boyce" wrote: ... You can change the table's field from a lookup type to a (?whatever the ... I know I get the ID field if I query against a 'lookup' value. ... NOT USE Lookup data type fields, for just that reasons. ...
    (microsoft.public.access.gettingstarted)