Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    1

    Unanswered: Code to print current record on the form

    Hi,

    I've created a table with a datefield with "MM/DD/YYYY" format. I've also created a form, query & a report based on the table. I want a form where user can enter Month (name of month in text) and a Year (in digits) and hit a command button to get the specific records falling in the specific month and year.

    I've created a query on the Month and Year. But the query asks for month in number and again pops up for year in number. Instead of two pop-up forms i want to create one form for user input. I have tried to create one, with a call to the query. But even after the user input the query pops up for the same information again.

    Can anybody help me finding a solution to this ?

    Thanks

    AA

  2. #2
    Join Date
    Apr 2003
    Location
    Alabama, USA
    Posts
    154
    Creat two textboxes on your form (e.g. txtMonth and txtYear). Refer to those textboxes as criteria in your query. It sounds like have just entered something like [Enter Month] in your query.

    After creating the two textboxes, refer to them in you query as
    Forms![frmName]![txtMonth]
    - where frmName is the mane of your form.

    If you have the same criteria in multiple queries that aer used for your report, be sure to change them all to refer to the form.

    Hope this helps!
    http://AccessDB.Info

    You live and learn. At any rate, you live. - Douglas Adams

Posting Permissions

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