I can't get this code to work

S

SF

Hi,

I have a main form consist of a textbox to hold a record ID. I put a
TabStrip control as well as a subform call "SubForm". The subform link to
main form by ID. I have 4 tabs each would link to their respective subform.

I have the function below that link to popup menu in the subform. But
everytime I right click and choose Edit from popup menu, access start to
crash

Function frmEdit()
'On Error GoTo Err_Edit

Dim frm As Form
''Dim sfrm As Form
Dim ctl As Control
Set frm = Screen.ActiveForm.SubForm.Form

''Set ctl = Screen.ActiveForm.ActiveControl
If frm.AllowEdits = False Then
frm.AllowEdits = True
End If

I user Office 2007

SF
 
D

Dale Fye

Is "SubForm" the name of the subform control? If not, use the name of the
control (not the name of the subform).

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 

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