Hi,
I am confused as to why the docmd.open form command is not working in the below code:
Dim MsgNewProc, Style, TITLE, ResponseNEwPRoc, MyStringNewProc
MsgNewProc = “Do you need to create a record for a NEW CONTRACT/AWARD Record?”
Style = vbYesNo + vbCritical + vbDefaultButton2
TITLE = “Is this a NEW CONTRACT/AWARD ?”
‘Help = “DEMO.HLP”
‘Ctxt = 1000
ResponseNEwPRoc = MsgBox(MsgNewProc, Style, TITLE)
If ResponseNEwPRoc = vbYes Then ‘ User chose Yes.
MyStringNewProc = “Yes” ‘ Perform some action.
On Error GoTo Err_Quit_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close acForm, “PIIN -> New -> Contract”, acSaveYes
DoCmd.Close acForm, “Procurement -> New -> Specification”, acSaveYes
‘DoCmd.Close Forms![PIIN -> New -> Contract].Form
‘DoCmd.Close Forms![Procurement -> New -> Specification].Form
DoCmd.OpenForm “Procurement -> Update -> Order or Contract Awarded”, acNormal
Else ‘ User chose No.
MyStringNewProc = “No” ‘ Perform some action.
On Error GoTo Err_Quit_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close
End If
When user answers yes to the question the form looks like it opens but really doesnt… the screen will actually blink like something happened but the form is not opened… I typed the following in the immediate window and get the following:
DoCmd.OpenForm “Procurement -> Update -> Order or Contract Awarded”,,,,,acWindowNormal…
…the form actually opens
? Forms(“Procurement -> Update -> Order or Contract Awarded”).Name…
… the form is found as I get this “Procurement -> Update -> Order or Contract Awarded”
Can anyone help me shed some light on this
Also Database originally created in Access 97 and upgraded thru years to 2007 and all other forms open fine using this method
thank you
Kevin