Message 1 of 3
Window behaviour
Not applicable
02-07-2002
06:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I created a small utility which ran a query on an Access database. When I first ran it (on Windows 95)only a small dialogue box appeared requesting the user to enter criteria.(Access stayed minimised) When we upgraded to Windows NT and now 2000, Access pops up in front of Autocad followed by the dialogue box. ~ It doesn't stop the form from working but it's not as neat as I would like it. Can anyone explain why this change should have happened without any change in the code ? Should teh code be amended in any way ?~ I've posted the code below. I'm a relative newcomer and completely self taught so forgive me if my code is untidy and contains any useless baggage. *****Code starts here****
Private Sub Getinfo_Click()
InfoBase = "P:\Gore\material.mdb"
Set Access = New Access.Application
Access.OpenCurrentDatabase InfoBase
Access.Application.Visible = True
On Error Resume Next
Access.DoCmd.OpenQuery "Mat1", , acReadOnly
Access.DoCmd.GoToRecord acDataQuery, "Mat1", acGoTo, 1
Access.DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectRecord, , acMenuVer70
Access.DoCmd.DoMenuItem acFormBar, acEditMenu, acCopy, , acMenuVer70
Access.DoCmd.Close acQuery, "mat1", acSaveNo
Access.CloseCurrentDatabase
Set Access = Nothing
Infotext.SetFocus
Infotext.Paste
End Sub
*****Code ends here*****
~ Hendie
Private Sub Getinfo_Click()
InfoBase = "P:\Gore\material.mdb"
Set Access = New Access.Application
Access.OpenCurrentDatabase InfoBase
Access.Application.Visible = True
On Error Resume Next
Access.DoCmd.OpenQuery "Mat1", , acReadOnly
Access.DoCmd.GoToRecord acDataQuery, "Mat1", acGoTo, 1
Access.DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectRecord, , acMenuVer70
Access.DoCmd.DoMenuItem acFormBar, acEditMenu, acCopy, , acMenuVer70
Access.DoCmd.Close acQuery, "mat1", acSaveNo
Access.CloseCurrentDatabase
Set Access = Nothing
Infotext.SetFocus
Infotext.Paste
End Sub
*****Code ends here*****
~ Hendie