kingsgambit
Registered User.
- Local time
- Today, 19:40
- Joined
- May 27, 2001
- Messages
- 134
I am pretty new to vb codes, but I was trying to use the Boolean variable.
I have a main menu where users can select to search,edit or delete reocrds.
If they click the edit or delete button they go to a search form when they have found the record from a list they click the search button which will open the record in a new form. I have a form for each.
On the main form I put
Dim frmtype as Boolean
If they clicked edit
frmtype = true
If they clicked delete
frmtype = false
On the search form when they clicked search
if frmtype = true then Docmd.open...edit form
else
if frmtype = false the Docmd...open delete form.
But the search button does not openeach of the forms depending on the bollean state.
Can anybody help
Where should the code go on the forms?
I have a main menu where users can select to search,edit or delete reocrds.
If they click the edit or delete button they go to a search form when they have found the record from a list they click the search button which will open the record in a new form. I have a form for each.
On the main form I put
Dim frmtype as Boolean
If they clicked edit
frmtype = true
If they clicked delete
frmtype = false
On the search form when they clicked search
if frmtype = true then Docmd.open...edit form
else
if frmtype = false the Docmd...open delete form.
But the search button does not openeach of the forms depending on the bollean state.
Can anybody help
Where should the code go on the forms?