Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting multiple records from a continuous form

Status
Not open for further replies.

mozgheib

Programmer
Dec 14, 2003
50
KW
Hello,

I have a bound form to a linked table. The table has got several rows. As part of each row structure there is a checkbox.

I would like to know how to select specific records from the form based on certain criteria?

It seems like I need to loop around something. Can u please tell me what to do I have no Clue.


Thanks.
 
Have you tried to play with the Filter and FilterOn properties of the form ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Easiest way for a single criterion is to, highlight or enter the field you want filtered, when the field record is correct & hit the "filter by selection" icon, on the toolbar. (form with lightning bolt through it).
eg; if you have a field called "txtCity" 7 you want to filter all records where txtCity = Montréal, scroll till any record shows Montréal in txtCity, enter cursor in txtCity, hit "filter by selection icon.

Secondly;
RecordSource property of form..
SQL eg;
Dim SQL as String

SQL = _
"SELECT tblCountries.* " & _ 'shows all fields
"FROM tblCountries " & _
"WHERE tblCountries.txtCity = ""Montréal"";"

Forms!frmCountries.RecourdSource = SQL

for the filter property it would be like..
Me.Filter = "txtCity = ""Montréal"""
Me.Filter.On = True

Hope this offers some direction?
Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top