Error 2585

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Error Text:
This action can't be carried out while processing a form or report event.

Code:

rivate Sub Command2_Enter()
On Error GoTo Err_Command2_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmDaysAttending"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "Switchboard", acSaveNo



Exit_Command2_Click:
Exit Sub

Err_Command2_Click:
Debug.Print Err.Description & " " & Err.Number & " " & Err.HelpContext
Resume Exit_Command2_Click

End Sub

I'm trying to use a switchboard form to control access to different forms.
I am closing the switchboard when a user clicks to go into a different form.

The frmDaysAttending does not have any code that runs in any of the form
events or detail events.

The data behind the form is derived from a query linking four tables
together. These links are defined in the Relationships area.

Tim
 
Are you doing this in the button's Enter or Click event? Also, instead of
closing the switchboard, try hiding it (Visible=False). It will look the
same to the user.
 

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

Similar Threads

open in datasheet view 1
Opening form to new record 1
Do a Cmd & then Close 3
Opening forms with same ID no 2
If Statements 2
Criteria when opening form 1
Missing operator Error 4
Error using Like* operator 1

Back
Top