Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do ....

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I using VBA code environment and SQL Server database.
I have two problems, i don't know how to do.
The first:
- I usually input date with (mm/dd/yyyy), but sometimes i want to input date (mm/yyyy). How to do this on the same field.
The second:
- In my program have many forms, how to manage form. Example: When form2 is opened by form1 i don't want form1 appear, but form2 is closed then form1 displayed (Note: form1 can open many forms).
Please help me. Thanks very much.
Ger
 
For the first case, you can specify any function key to input the date,,,
Exp. when press F2 let that feild to accept mm/dd/yyyy when F3 mm/yyyy., As i know, one field can't be specified more than one format.

For the Next case, you can use either Macro to close and close then open....it depense how many form showld be close or open, or use Docmd.close acform "Form Name",,,,Docmd.openForm "Form Name"....

and if you explain to me more may i can tell you or send you the code.

Good Luck
 
For your second problem, try using the IsLoaded function. This function checks to see whether a particular form is open or not, and then enables you to take appropriate action.

Check the Access helpfile topic "Isloaded Function" for more details.

HTH
Lightning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top