Toggle Buttons

G

Guest

Hi, there is probably a pretty simple answer to this but here it goes:

I Have 2 toggle buttons which alternate with one another, they both bring up
different forms while hiding the other form what I want todo is to click the
next/previous record button and for the the record to appear and the correct
form to display depending on if a field from form1 is empty so far I have got
:

Private Sub nextrecord_Click()
On Error GoTo Err_nextrecord_Click
DoCmd.GoToRecord , , acPrevious

Exit_Command342_Click:
Exit Sub
Err_Command342_Click:
MsgBox Err.Description
Resume Exit_Command342_Click
End Sub

How would i tell the toggle2ndform button to activate so the 2nd form would
be displayed?
 
G

Guest

You could simply add

If textboxform1.text ="" then
toggle2ndform.visible=true
Else
toggle1stform.visible=false
end if
depending on what you want.

You can switch the true and false option if needed

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top