Hi everyone,
Here is my problem. I have created a database to store information on raw material stored in a ware house. Each class of raw material have a given expire date, and some of my user are messing up this vital information when a new raw is introduced.
Have a starting form with different cmd buttons (Cmd1, Cmd2…) all opening the same form (mainform) with common information to enter, but also activates different sub forms depending on the raw material in question.
So:
Cmd1 open mainform + subform1 (with expire date 6 months)
Cmd2 open mainform + subform2 (with expire date 1 year)
Depending on the Cmd clicked, expire date will be different and I would like to remove the human error and automatically enter expire date from a cmd click.
I have been trying something like that:
DoCmd.OpenForm "mainform"
DoCmd.GoToRecord , "mainform", acNewRec
Forms![mainform]!text1.Value = "text"
Forms![mainform]!Subspace.SourceObject = "subform1"
Forms![mainform]!text2 = dateadd (“mmmm”,6,date())
How can I add automatically 6 months or 1 year to the actual date from a cmd click.
Hope you understand and that you can help me.
Thanks,
Froggy.
Here is my problem. I have created a database to store information on raw material stored in a ware house. Each class of raw material have a given expire date, and some of my user are messing up this vital information when a new raw is introduced.
Have a starting form with different cmd buttons (Cmd1, Cmd2…) all opening the same form (mainform) with common information to enter, but also activates different sub forms depending on the raw material in question.
So:
Cmd1 open mainform + subform1 (with expire date 6 months)
Cmd2 open mainform + subform2 (with expire date 1 year)
Depending on the Cmd clicked, expire date will be different and I would like to remove the human error and automatically enter expire date from a cmd click.
I have been trying something like that:
DoCmd.OpenForm "mainform"
DoCmd.GoToRecord , "mainform", acNewRec
Forms![mainform]!text1.Value = "text"
Forms![mainform]!Subspace.SourceObject = "subform1"
Forms![mainform]!text2 = dateadd (“mmmm”,6,date())
How can I add automatically 6 months or 1 year to the actual date from a cmd click.
Hope you understand and that you can help me.
Thanks,
Froggy.