Display Save As Choice
The example selects the form whose name is passed to it and then displays the choice of saving as a new object in the present databse or exporting the form.
' ***************** Code Start ************************
' Example by Terry Wickenden
Sub FormSaveAs(strName as String)
On Error GoTo ErrSaveAs
DoCmd.SelectObject acForm, strPass, True
DoCmd.RunCommand acCmdSaveAs
Exit Sub
ErrSaveAs:
Select Case Err
Case 2501
'Cancel Selected in Dialog Box
Case 2544
'Form does not exist
MsgBox strName & " is not a valid form name.", vbCritical, "Save Problem"
Case Else
MsgBox Err & ":-" & vbCrLf & Err.Description, , "Save Problem"
End Select
End Sub
' ******************* Code End *********************
Return to Example List