Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    516
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help needed on Form (access 2000)

    I have two queries that I'm gonna use to display data from two tables in the same form, side by side. I'm gonna create two forms using these two queries and put them as subforms in another form to display them side by side. the problem is that, I want to be able to give the user the coice of by date and I want the default date to be Date().

    How do I do this?

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: help needed on Form (access 2000)

    Have a textbox control on your mainform that allows a Date entry, setting its DefaultValue to Date(). Have the queries for your subform use refer to this textbox as a Selection criteria. You will need to requery the subforms in the AfterUpdate event of your textbox.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    516
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: help needed on Form (access 2000)

    Hiya, thanks for the reply.
    I can do the text box control but I REALLY don't know how I could use this as a selection criteria in the queries.
    What I've done was created two forms using two queris to extract data from two tables. I have another form which has these two forms as sub forms, it also has a text box which allows the user to enter a date and the default property of this text box is set to Date() and I've set the date criteria of the underlying queries to =[Forms]![ formname]![textbox name]. What I want the user to be able to do is open the form and the form should have data with todays date and be able to enter a date to retrieve data if they chose to but what the form does is when I try to open the form it prompts me to enter the date not just once but twice, What am I doing wrong?

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: help needed on Form (access 2000)

    Let's try a different tact. Eliminate the date selection criteria in the queries. For each subform control on the mainform, we want to set the Linking properties. The Linked Master will be you control name of the data textbox. The Linked Child will be the Date field name from each query.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    516
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: help needed on Form (access 2000)

    Sorry but I really don't understand. What do you mean by subform control? What I've done is linked the 1st query to the 2nd. that will only display the data which is related to the records in the first query so I will only have to enter the criteria once but it still isn't what i want. I want it to go to todays records and if the user wanted the should have a choice of retriving records by entering a date.

    You know what I think it works, which is the command to requery?
    Docmd.Requery
    Me.Refresh
    I've tried both of these commands on AfterUpdate event but both gives me error messages.

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: help needed on Form (access 2000)

    >>What do you mean by subform control? <

    This is the type of control that holds a subform. There are many different types of controls: textboxes, comboboxes, listboxes, images, subforms, etc. If you don't understand this, perhaps you should consider taking an Access course somewhere that can guide you through the basics. This often helps in getting you past the early frustrations.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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