Question with MS Access database...

1. how to pass a global variable from one form to another
I have two forms: Switchboard and Master log
on the start (Switchboard) there is no problem, it gets the username based on the windows Id (ModFosUser). Then when you make a selection to go EE Queue log it will open the second form. Now, when you hit the NEw button it should bring Your name to EE Name and fill Creation Date with today's date (working )
2. what to do to make sure it will fill the grid only after filling all mandatory fields..
in my case those are:
EEName
Creation date
SA no
queue type
queue status
Really need your help
Master-stats---test.accdb
Roman FAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MacroShadowCommented:
1. The definition of a global variable is that it is accessible from all forms. Set it once and it stays in memory until cleared.
In your case you can also use the OpenArgs property of the form instead of global variable. OpenArgs is the last parameter of the DoCmd command, is is used to send a string to the form that is being opened.
DoCmd.OpenForm FormName, View, FilterName, WhereCondition, DataMode, WindowMode, OpenArgs

2. Check in code that all are mandatory fields are filled in the BeforeUpdate event.
0
Roman FAuthor Commented:
thank you for your fast response, sounds not clear...
where should i put those?
0
MacroShadowCommented:
Sorry, I thought you just needed a push in the right direction.
Master-stats---test.accdb
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Roman FAuthor Commented:
sorry, what you did you put windows id, I do not need that, I know how to get that, I need Name....
0
MacroShadowCommented:
I don't understand. What is "Name"?
0
Roman FAuthor Commented:
Ok, i was able to "fix" that, the first thing is working, let me check the second part, thank you very much
0
Roman FAuthor Commented:
for example the windows id fedoror, the name associated is  Roman Poul. all info from tbl_user

ID      sUserID      sUserName      sUserWindowsID      sUserDeviceID      Active      sUserRole
15      015      Roman Poul      fedoror      D194347      True      2
0
John TsioumprisSoftware & Systems EngineerCommented:
I must say it...i missed the split form feature on the newer Access versions...but in your case i reckon is not what you need...
you have a clear parent-child relationship between the employee and the task he/she assigned to....so the split form is not helping to this direction
take a look at my quick and very "dirty" sample and let me know
Master-stats---test.zip
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Roman FAuthor Commented:
Thank you, learned a lot
I have two more questions, promise they are small:
1. On my Switchboard form the name right after a Welcome has a slightly different color of the font, It does not matter what i do, it does not look the same how the rest of words on the form
2.  I f i want to cancel the adding the new record during the input what should be added?

and thank you for adjusting the module, thank you
0
MacroShadowCommented:
1. in design view make sure all the labels properties match.
2. hit the Esc button.
0
Roman FAuthor Commented:
thank you, the control which does not match the rest of the labels is text box...
0
MacroShadowCommented:
change it to a label
0
Roman FAuthor Commented:
thank you guys
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SQL

From novice to tech pro — start learning today.