Click here to Skip to main content
16,004,901 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalnetwork properties Pin
CompuGod28-Apr-03 2:56
CompuGod28-Apr-03 2:56 
GeneralDisabled Combo Box Text Color Pin
BigRetina28-Apr-03 2:28
BigRetina28-Apr-03 2:28 
GeneralIIS FTP Pin
paulwhygle26-Apr-03 20:06
paulwhygle26-Apr-03 20:06 
GeneralRe: IIS FTP Pin
ScaleOvenStove5-May-03 13:21
ScaleOvenStove5-May-03 13:21 
GeneralEnable and Disable Pin
CompuGod26-Apr-03 5:45
CompuGod26-Apr-03 5:45 
GeneralI need a help Pin
Nicholas Naddaf25-Apr-03 4:53
Nicholas Naddaf25-Apr-03 4:53 
GeneralRe: I need a help Pin
Ray Cassick25-Apr-03 8:19
Ray Cassick25-Apr-03 8:19 
Generalfiltering in Access with VB Pin
Anonymous24-Apr-03 10:13
Anonymous24-Apr-03 10:13 
Hello,

I want to filter a search of my records in teh database, but am a little perplexed as to how to filter more than one criteria. This is what I am trying to do.
On my Main Menu Form, there is an option to "Look up friends by area code." These area codes are in a drop down menu, so if the user selects '123' for example, then it will open a new form (friend_frm) and every friend in area code '123' will be listed.

My problem is, I have a field in the frm_friend, called active/passive. I do not want friends to show up if they are listed as passive. I don't know how to incorporate this into my filter.

Private Sub Command97_Click()
On Error GoTo Err_Command97_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frm_friend"

stLinkCriteria = "[Area Code]=" & Me![Combo94]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command97_Click:
Exit Sub

Err_Command97_Click:
MsgBox Err.Description
Resume Exit_Command97_Click

End Sub

What do I add to "stLinkCriteria' to make it filter out the subset of the records of friends who are in a particular area code?

If anyone knows how to do this, I'd be very appreciative. Thank you very much.

Nick
GeneralRe: filtering in Access with VB Pin
J. Dunlap24-Apr-03 10:23
J. Dunlap24-Apr-03 10:23 
GeneralHiding Members Pin
THEMYTH24-Apr-03 4:10
THEMYTH24-Apr-03 4:10 
GeneralRe: Hiding Members Pin
apferreira26-Apr-03 1:57
apferreira26-Apr-03 1:57 
GeneralWeb Browser control as Windows Explorer Pin
Villly23-Apr-03 22:57
Villly23-Apr-03 22:57 
GeneralRAS API Pin
clever_webguy23-Apr-03 20:29
clever_webguy23-Apr-03 20:29 
GeneralAccess / VB / Images / feature select Pin
JimWDurbin23-Apr-03 19:18
JimWDurbin23-Apr-03 19:18 
GeneralToolBar Transparent BackColor Pin
Anomaly102423-Apr-03 15:59
Anomaly102423-Apr-03 15:59 
GeneralDatagrid Pin
Anonymous23-Apr-03 3:42
Anonymous23-Apr-03 3:42 
GeneralWindows XP Listboxes Pin
Chris Ormerod22-Apr-03 18:26
Chris Ormerod22-Apr-03 18:26 
GeneralRe: Windows XP Listboxes Pin
J. Dunlap22-Apr-03 19:39
J. Dunlap22-Apr-03 19:39 
GeneralRe: Windows XP Listboxes Pin
Chris Ormerod22-Apr-03 21:11
Chris Ormerod22-Apr-03 21:11 
GeneralData Marshaling Pin
Rich B.21-Apr-03 11:10
Rich B.21-Apr-03 11:10 
GeneralDrag and drop textboxes Pin
Txoov21-Apr-03 8:07
Txoov21-Apr-03 8:07 
GeneralRemoting Pin
cbr21-Apr-03 6:33
cbr21-Apr-03 6:33 
Generalcreating a web server Pin
THEMYTH20-Apr-03 14:06
THEMYTH20-Apr-03 14:06 
GeneralRe: creating a web server Pin
Mario_Young20-Apr-03 18:20
Mario_Young20-Apr-03 18:20 
QuestionHow to CreateDibSection with GDI+ Pin
DigitalArts20-Apr-03 5:27
DigitalArts20-Apr-03 5:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.