Results 1 to 6 of 6
  1. #1
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476

    Have Form open to specic Date


    How might I have a Form open up to a specific date such as, Date()-1? When I put in the results of yesterday's games I would like to have the Form automatically open up to yesterdays Date? Thanks in advance.

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,538
    How might I have a Form open up to a specific date such as, Date()-1?


    What does this mean? Do you want a control in your form to display yesterday's date? Are there records stored that have yesterday's data in them that you want the form to open to a particular record? Your question is to vague for a response. The moderators took away my crystal ball last week and I am at a loss with your question.

  3. #3
    alcapps is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    292
    On open event of the form you might consider setting the filter to for the previous date..

    is one but your question need more explanation to answer with more clarity..

  4. #4
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    Actually I have 2-questions based on when a Form is opened:

    1) First off, I’m referring Forms with subforms (whether or not that matters) I don’t know how to phrased my question then to simple say that when I open up this particular Form I wish for the Form to open to yesterday’s date Date()-1. It's a database where teams who play against one another are already pre-entered into the table/database, but of course I don’t know the results until the day after games played. So, in my Table I may have games (Teams vs. Teams) already pre-entered at least 2-wks in advance, but when open of a Form to enter yesterday’s results I want the Form to open up to yesterday’s date. I suppose I can just have a separate Form specifically saved as yesterday’s date

    2) My other question regarding opening Forms is, I created this form which has a search command, but I would like to have the Form open up in the specific field I run the search. So. say I have field “A” & “B” I run the search in field “B”, but my form by default opens up in field “A”. How might I change it where my Forms opens up in field “B”?

    Please, I honestly mean no disrespect to you or anyone here on this forum. Thank you for suggestion those Datapig Access Tutorial videos which I must have watch at least 100 times relating to Combo Boxes; I still cannot create Combo Boxes which really-really frustrates me & makes me angry, but that’s another story. I hope my questions provides more clarity.

  5. #5
    alcapps is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    292
    if you post your form in a database with some data I can help you with the date-1 one issue.

    usually we use vba to set the focus to another field or you can use tab order.

    in vba if you do me.textfieldname.setfocus it access will move focus to that field.

    on open event

    add me.yourtextfieldname.setfocus

    or
    go to tab order and make that one 1 and rest 2.....n and it will open to that field every time.

    Hope that helps

  6. #6
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    Alcapps,

    Thanks for offering me to post my database for further assistance.

    1. As far as my Date()-1 issue I solved it by just creating a Form which just contains yesterday’s dates (games played).
    2. With having a Form open up to a particular field, going in & changing the Tab Order did the trick, thanks!


    I don’t think you might recall but you were the person who set up a Form for me with a selected Combo Box based on a Sub Form (Makes & Models). Well, when I tried to create another similar Form set up such as the one it sent me it didn’t fly & somehow it screwed up the first Form. I spent several hours trying to back track & figure out what I did wrong, but I got too frustrated. It’s a bum-mer, because I can use this concept (having a Combo Box to select data to pull up the field’s Records in a Sub-Form, but it’s seems a bit too complicated to me; Yes, I watched the video on datapigtechnolgies 15-times. I’m sure that it’s not if I invested more time. To compromise, I instead added a search command button in the MakesModels Form. So when I need to add a new model to say, “Toyota’ which is at the bottom I just click on the Search Button, type in “Toyota” & it jumps me to the “Toyota” Record. BTW, not to confuse you I’m referring to my dealership dbs whereas the above 1 & 2 issues are in another dbs. Thanks again alcapps, DJ

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 01-28-2013, 05:21 PM
  2. Open a form based on date off another form
    By BorisGomel in forum Access
    Replies: 1
    Last Post: 11-29-2012, 04:42 PM
  3. Replies: 10
    Last Post: 06-13-2012, 05:57 AM
  4. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  5. Replies: 2
    Last Post: 02-26-2010, 08:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums