Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / July 2005

Tip: Looking for answers? Try searching our database.

Inserting an OR operator into an event procedure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rhysickle - 13 Jul 2005 11:34 GMT
First, some background:

All teachers can author a multiple number of projects, and can be the lead
author or co-author for each project.

I have 2 tables - TBL projects and TBL teachers. Projects looks up teacher
name sfrom TBL Teachers by Teacher ID.

There are 2 forms - FRM Teachers and FRM Projects

Below is the visual basic that access has given me for a button to open FRM
Projects from FRM Teachers, filtering for all projects "Lead Authored" by the
teacher on display. I want to filter for all projects lead authored or co
authored by the tutor. So I need to find a way of changing "[Lead Author ID]"
to "[Lead Author ID] or [Co-Author ID]" without mucking up the syntax.

Dim stDocName As String
   Dim stLinkCriteria As String

   stDocName = "FRM Projects"
 
   stLinkCriteria = "[Lead Author ID]=" & Me![Teacher ID]
 
   DoCmd.OpenForm stDocName, , , stLinkCriteria
Dennis - 13 Jul 2005 11:40 GMT
stLinkCriteria = "[Lead Author ID]=" & Me![Teacher ID] & " Or [Co-Author ID]
= " & Me![Teacher ID]

> First, some background:
>
[quoted text clipped - 20 lines]
>    
>     DoCmd.OpenForm stDocName, , , stLinkCriteria
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.