PC Review


Reply
Thread Tools Rate Thread

Passing variables from multiple records

 
 
HeatherD25
Guest
Posts: n/a
 
      23rd Jun 2008
I have a form that displays a list of facilities that are assigned to a user
(it brings up the list based on the username they enter when logging into the
database). They could have one or many records listed on their form.

I want them to be able to select a checkbox next to each facility if they
want to see all of the records related to the facility they select. I
created a field called "VIEW_STATUS" for the checkbox. The facility field is
called FACILITY.

I can't figure out how to send multiple values of facility/view status as
the filter. To pass the first instance I think I can use (side note - am I
passing the true/false value correctly? I was getting an error.):

stLinkCriteria = "FACILITY_ID = " & Me.FACILITY_ID.Value & " AND " &
"VIEW_STATUS='True'"

How can I make this send ALL of the rows?

Thanks!!!!
Heather
 
Reply With Quote
 
 
 
 
JimS
Guest
Posts: n/a
 
      23rd Jun 2008
Heather, I typically use a multiselect list box.
--
Jim


"HeatherD25" wrote:

> I have a form that displays a list of facilities that are assigned to a user
> (it brings up the list based on the username they enter when logging into the
> database). They could have one or many records listed on their form.
>
> I want them to be able to select a checkbox next to each facility if they
> want to see all of the records related to the facility they select. I
> created a field called "VIEW_STATUS" for the checkbox. The facility field is
> called FACILITY.
>
> I can't figure out how to send multiple values of facility/view status as
> the filter. To pass the first instance I think I can use (side note - am I
> passing the true/false value correctly? I was getting an error.):
>
> stLinkCriteria = "FACILITY_ID = " & Me.FACILITY_ID.Value & " AND " &
> "VIEW_STATUS='True'"
>
> How can I make this send ALL of the rows?
>
> Thanks!!!!
> Heather

 
Reply With Quote
 
 
 
 
NetworkTrade
Guest
Posts: n/a
 
      23rd Jun 2008
assuming that the checkbox is a permanent field/column in your 'facilities'
table:

make a new Query1 sourced on the Facilities table ...and set the checkbox
column criteria to 'Yes'

this Query1 will return records only for those now that are checked (a
cursor left alive in a form record will not be included unless you manipulate
'Dirty')

create a new Query2 that has the Status table and Query1. make a join
between them with the crossreferencing field with join property set to All of
Query1 and only those of Status that correspond.

Query2 will now display records of Status table that correspond to Query1

--
NTC


"HeatherD25" wrote:

> I have a form that displays a list of facilities that are assigned to a user
> (it brings up the list based on the username they enter when logging into the
> database). They could have one or many records listed on their form.
>
> I want them to be able to select a checkbox next to each facility if they
> want to see all of the records related to the facility they select. I
> created a field called "VIEW_STATUS" for the checkbox. The facility field is
> called FACILITY.
>
> I can't figure out how to send multiple values of facility/view status as
> the filter. To pass the first instance I think I can use (side note - am I
> passing the true/false value correctly? I was getting an error.):
>
> stLinkCriteria = "FACILITY_ID = " & Me.FACILITY_ID.Value & " AND " &
> "VIEW_STATUS='True'"
>
> How can I make this send ALL of the rows?
>
> Thanks!!!!
> Heather

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing multiple variables through functions Xiazer Microsoft Excel Programming 2 25th Apr 2006 06:56 PM
Passing multiple records to a stored procedure.... =?Utf-8?B?UGF1bCBIYWxl?= Microsoft C# .NET 2 8th Nov 2005 03:15 AM
Simple: passing multiple variables into a datagrid hyperlinkcolumn? Roy Microsoft ASP .NET 1 21st Jul 2005 04:19 AM
sub report and passing records to memory variables =?Utf-8?B?amFtZXM=?= Microsoft Access VBA Modules 0 14th Jun 2005 10:51 PM
Passing variables to multiple instances of a form Evan M Microsoft Access Form Coding 5 27th Jan 2005 10:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:33 AM.