[AccessD] Query expression refers to column(1) on a form

David McAfee davidmcafee at gmail.com
Wed Oct 1 11:09:34 CDT 2014


I could of sworn that I have done it via a query before, maybe it was in a
later version (I'm using A2003).

Maybe it was always done with VBA.

Thanks again.

D

On Tue, Sep 30, 2014 at 6:15 PM, Stuart McLachlan <stuart at lexacorp.com.pg>
wrote:

> I've never been able to do it either.  I generally use a Static function
> which I set before
> opening the query/report:
>
> Static Function BatchName( optional s as string) as string
> dim store as string
> if not ismissing(s) then
>         store = s
> end if
> Batchname = Store
> end function
>
> Then put GetbatchName() in the query
>
> And in the onClick which invoked the query or whatever:
>
> ...
> BatchName  cboBuildType.Column(1) & " " &
> Format(cboMonth.Column(2), "yyyymmdd")
>
> Docmd.OpenReport "rptMyRreport"
> ...
>


More information about the AccessD mailing list