PDA

View Full Version : Link a form to a unbound text box



AnthonyG
03-09-2009, 02:18 AM
Hi All,
I've created a text box which is CALLED "Today" and that has =date() as its input
2. from there I'm rolling out 10 days with "Dateadd"
3. Because my "Today" text box is unbound I'm having trouble opening another form linked by date. This does have the same date and is correctly formatted.
4. I have used the wizard in other situations to date, and with no issues.
5. I tried to trial my data for compatibility, by inserting a sub form.
6. This where I identified the issue of connecting to a unbound text box
7. I'm trying to open another form with all the details that have been previously entered so as changes, if required, can be made.

Can any body help me out? or make suggestions to solve my problem.

Thanks

AnthonyG:banghead:

OBP
03-09-2009, 06:20 AM
Create a Query for the other form and place this in the Required Date Column's Criteria Row
Forms![formname]![fieldname]

where formname is the actual name of your form and fieldname is the name of the field holding the date + 10 days.

All you need to do then is requery the second form each time you enter the date.

AnthonyG
03-09-2009, 12:55 PM
Thanks very much. I have used what you have proposed and with success so I shall implement that immediately. Thank you.
If I may extend on my origional question? I have on my main form 10 different dates.
All are based on today's date and then using dateadd I'm populating the remaing nine. So as we can see what work is coming and where booking oppurtunities lie.
So with your proposal, And with my understanding (limited) I would have to have 10 total queries and then 10 forms. Unless I can expand on the criteria to use an "Iif" type statement?
Would you have any further thoughts?
Again many thanks for your reply. This is my third site visit and first reply! So, Thank you
AnthonyG:friends:

OBP
03-10-2009, 06:46 AM
Anthony, it would depend on what you want the query to do, if you want the first OR the second OR the third etc then you can have the same
Forms![formname]![fieldname]
in the other Columns as well, however each one should go on a different "Criteria Row".
If you want to be able to Choose which "Date" field is the one that the query is filtered by, you can provide the users with an Option Frame.
See this Thread for an example of this technique in the database that I posted on #33.

AnthonyG
03-10-2009, 12:22 PM
Sorry, Can you ID the thread for me a bit better, I've picked up your comment being number 33! Maybe it's my mis understanding being a newbie and all!
Thanks
AnthonyG

OBP
03-10-2009, 12:30 PM
Anthony, No sorry, the post lost my Link for some reason.
http://forums.techguy.org/business-applications/794192-run-actions-selected-identities-3.html