Q
Qoo
Guest
Hiya
I have a DB where the user selects which department he wished to add data for from a main form. At present the user can open all 5 departmental forms simulatneously, however, im trying to make it so that only one department can be open at any one time and when they go to open anew department a msgbox opens.
I have tried using the code i used to use in VB but it doesnt seem to work.
In the departmental buttons i have some code:
private sub cmdtapes_click()
if form_toxic.open = true then
msgbox "Please do not open more than one form at a time"
form_toxic.close
end if
I think it is something to do with the open and close commands and how i am refering to the form in VBA
can any offer any help?
thanks very much
Qoo
I have a DB where the user selects which department he wished to add data for from a main form. At present the user can open all 5 departmental forms simulatneously, however, im trying to make it so that only one department can be open at any one time and when they go to open anew department a msgbox opens.
I have tried using the code i used to use in VB but it doesnt seem to work.
In the departmental buttons i have some code:
private sub cmdtapes_click()
if form_toxic.open = true then
msgbox "Please do not open more than one form at a time"
form_toxic.close
end if
I think it is something to do with the open and close commands and how i am refering to the form in VBA
can any offer any help?
thanks very much
Qoo