Linking Parameter values of a query using form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bilalkhan
    New Member
    • Sep 2008
    • 2

    Linking Parameter values of a query using form

    Hello

    I m using MS Acces 2007, I need to create a form through which a user can enter all the parameter values in the form and these values will automatically picked by a query:

    Here is the query which i want to link with a form
    Code:
    INSERT INTO [DSF Daily Activity Query mode] ( [Code:], [Month:], [Date:], [Cont Made], [Appt Made], [Appt Atten], [No of PFRs], Cases, Premium, [Rept Mgr Code:], [Rept Type:] )
    
    SELECT [DSF Daily Activity 1].[Code:], [DSF Daily Activity 1].[Month:], [DSF Daily Activity 1].[Date:], [DSF Daily Activity 1].[Cont Made], [DSF Daily Activity 1].[Appt Made], [DSF Daily Activity 1].[Appt Atten], [DSF Daily Activity 1].[No of PFRs], [DSF Daily Activity 1].Cases, [DSF Daily Activity 1].Premium, [DSF Daily Activity 1].[Rept Mgr Code:], [DSF Daily Activity 1].[Rept Type:]
    
    FROM [DSF Daily Activity 1]
    
    WHERE ((([DSF Daily Activity 1].[Date:]) Between [From Date ] And [To Date])) OR ((([DSF Daily Activity 1].[Code:])=[Enter Code]));
    I want "Form Date", "To Date" and "Enter Code" parameters to be linked with a form where a user can enter the values.

    My form name is "Data Entry"

    Please help me to resolve this problem.
    Last edited by NeoPa; Sep 23 '08, 12:59 PM. Reason: Please use the [CODE] tags provided
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32656

    #2
    Referring to Items on a Sub-Form gives some clues, but in this case you simply want :
    Code:
    Forms![Data Entry]![From Name]
    Forms![Data Entry]![To Name]
    Forms![Data Entry]![Enter Code]
    You may need to adjust the Control names to those you've actually defined.

    Comment

    • bilalkhan
      New Member
      • Sep 2008
      • 2

      #3
      Thank You so much its really very helpful for me.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32656

        #4
        My pleasure :)

        Welcome to Bytes!

        Comment

        Working...