Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Posts
    107

    Unanswered: Specifying a where clause in macro to select records

    I have a list of contacts in a contact table. I also have a scheduler table that contains appointment dates for each contact. I've created a relationship between the two tables for the Contact IDs called "recruitmentID".
    I've created two bound forms - one for each table. When the user clicks on my "Scheduler" button on the contact details form, its currently running a macro that has the following for the Where clause:
    ="[RecruitementID]=" & [Forms]![Recruitment]![RecruitementID]

    NB: there are typos which I am aware of for the "recruitmentID'

    The Action parameter of the macro is "open form"
    The first ="[RecruitementID]=" is referring to the contact id field in the new form.

    "[Forms]![Recruitment]![RecruitementID]" refers to the control name on the contact form that contains the value i want to pass to the scheduler. Right now, when i run this code, the scheduler opens but doesn't display details for records that already exist.

    My questions are:
    1. what am I missing?
    2. Is this even the right approach? meaning, will i be able to retrieve existing records and add new ones using this design?
    3. what's the difference between using the FILTER parm on the macro vs. the WHERE clause?
    I've been playing around with both but can't see a difference.
    Thanks.

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    Why not just point the Query to open forms
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Feb 2003
    Posts
    107
    Hey there. I just figured it out. The DataEntry mode was set incorrectly / or at least changing it seems to have made a difference.
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •