J
jovobas
I created a multi-user db, with users Admin and student in an mdw-
file.
When a student logs on, he gets a switchboard with a few buttons, one
for creating a form.
This button has an onclick-event calling a vba-sub: makemyform, making
a form from scratch, with module attached.
At the end of the sub I try to save the new form with this code:
temp = frm.Name
newName = "frm_" & uniquename 'the sub calls a function for
creating a unique name
'Saving the form
With DoCmd
1 .Save acForm, temp
2 .Close acForm, temp, acSaveYes
3 .DeleteObject acForm, newName
4 .Rename newName, acForm, temp
5 .Close acModule, mdl.Name, acSaveYes
End With
When the student hits this code, there is a 2501 error at line 1, "the
save action was cancelled".
Now the strange part
if a student runs this as Admin, he gets the same error.
if I run this either as Admin or student, I don't get the error.
Any and all insights welcome.
tnx
file.
When a student logs on, he gets a switchboard with a few buttons, one
for creating a form.
This button has an onclick-event calling a vba-sub: makemyform, making
a form from scratch, with module attached.
At the end of the sub I try to save the new form with this code:
temp = frm.Name
newName = "frm_" & uniquename 'the sub calls a function for
creating a unique name
'Saving the form
With DoCmd
1 .Save acForm, temp
2 .Close acForm, temp, acSaveYes
3 .DeleteObject acForm, newName
4 .Rename newName, acForm, temp
5 .Close acModule, mdl.Name, acSaveYes
End With
When the student hits this code, there is a 2501 error at line 1, "the
save action was cancelled".
Now the strange part
if a student runs this as Admin, he gets the same error.
if I run this either as Admin or student, I don't get the error.
Any and all insights welcome.
tnx