Reusable Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several forms that would use the exact same syntax to populate a drop
down combo box, with the exception of the name of the form.

Is there a way to grab the name of the form, when it loads, and place that
into the query where I would normally put the form name?

IE:
Form 1 would end upwith some thing like
where [AirportCode] = forms![frmInBoundOrder]![APCode] and
Form 2 might be
where [AirportCode] = forms![frmOutBoundOrder]![APCode] where

The only thing that changes is the name of the form.

I would like to save it as something like qryPickUpVendor and then just set
the record source ?? on the control on each seperate form to the name of this
query.

Thanks in advance for any help you may be able to provide.
 
I think the short answer is... No, and the long answer is... With
programming, anything is possible.
 
Anything? My mind is reeling with possibilities! ;)

Fred Boer

[MVP] S.Clark said:
I think the short answer is... No, and the long answer is... With
programming, anything is possible.

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

cvegas said:
I have several forms that would use the exact same syntax to populate a
drop
down combo box, with the exception of the name of the form.

Is there a way to grab the name of the form, when it loads, and place
that
into the query where I would normally put the form name?

IE:
Form 1 would end upwith some thing like
where [AirportCode] = forms![frmInBoundOrder]![APCode] and
Form 2 might be
where [AirportCode] = forms![frmOutBoundOrder]![APCode] where

The only thing that changes is the name of the form.

I would like to save it as something like qryPickUpVendor and then just
set
the record source ?? on the control on each seperate form to the name of
this
query.

Thanks in advance for any help you may be able to provide.
 
Back
Top