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.
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.
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.![]()
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..
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.
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
Alcapps,
Thanks for offering me to post my database for further assistance.
- As far as my Date()-1 issue I solved it by just creating a Form which just contains yesterday’s dates (games played).
- 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