Results 1 to 8 of 8
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    References & Tab Order (WXP Access 2002)

    1. First Problem: I'm developing an application on my computer (Access 2002), but destined for a system running Access 2000. I notice, however, that the Acess 2000 application has Microsoft Access 9.0 Object Library and Office 9.0 Object Libraries referenced whereas my 2002 application has version 10.0's. Everything seems to work OK on the target 2000 machine except for the following function:

    (msoFileDialogFilePicker)

    My questions are a) can version 10.0 be loaded into an Access 2000 installation? or [img]/forums/images/smilies/cool.gif[/img] is there a function available under 9.0 that is equivalent to the above FilePicker?

    2. Second Problem: I can set the tab index property to anything I want on fields in two of the three tab control pages on a form, but not on the first page. When I change a tab index on some of the fields on this page it changes it right back to something else. I don't understand why.

    Thanks for any suggestions.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: References & Tab Order (WXP Access 2002)

    1. No, you can't use the 10.0 libraries in Access 2000. you can't mix versions this way.

    Office 95 = 7.0
    Office 97 = 8.0
    Office 2000 = 9.0
    Office 2002 aka XP = 10.0
    Office 2003 = 11.0

    The File Open dialog was introduced in Access 2002. If you want your databases to run on Access 2000, you must avoid using the new File Open dialog. Instead, use Windows API calls; they will work in any version. You can download a demo database with ready-to-use code and an example from <post#=304810>post 304810</post#>.

    2. Have you tried using View | Tab Order... to change the tab order of the controls? If you want to change the tab order of controls on a tab page, click on the page tab before selecting View | Tab Order...

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: References & Tab Order (WXP Access 2002)

    The mso library is determined by the Office installation on the machine. The filedialog object was introduced in OfficeXP, so it won't be available in Office 2000 and you can't use it in an application intended to run in Access 2000, which won't recognize it anyhow. You have to be very careful when creating a database to run in a prior version that you don't include things that were not available until XP. In 2000, you have to use the API calls for the FileOpen dialog. Some of that code has been posted here, or you can find a version here.

    With respect to tab index, it isn't the best way to handle tab order, since changing an index results in reshuffling of a bunch of indexes. Are you setting the index in the tab page itself? Are any of the controls shared between the pages (bound to the parent form rather than the tab page)? That will cause you problems in this regard.
    Charlotte

  4. #4
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: References & Tab Order (WXP Access 2002)

    Hi Charlotte,

    I tried to run the following code you recommend, but I get a "Sub or Function not defined error" for the "ahtAddFilterItem"
    Sub getFilename()

    Dim strFilter As String
    Dim strInputFileName As String

    strFilter = ahtAddFilterItem(strFilter, "Image Files (*.jpg)", "*.bmp")
    strInputFileName = ahtCommonFileOpenSave( _
    Filter:=strFilter, OpenFile:=True, _
    DialogTitle:="Please select an image file...", _
    Flags:=ahtOFN_HIDEREADONLY)
    End Sub

  5. #5
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: References & Tab Order (WXP Access 2002)

    Hi Hans,

    I tried the following code, but I get "user defined type not defined" with regard to the "dlg As New CommonDialog" part of the code.

    Sub getFileName()
    Dim dlg As New CommonDialog
    With dlg
    .fileName = "*.jpg"
    .InitDir = "C:Windows"
    .Filter = "Image Files (*.jpg)|*.bmp|All Files (*.*)|*.*"
    .Flags = cdlHideReadOnly Or cdlFileMustExist Or cdlPathMustExist
    If .OpenDialog() = True Then
    MsgBox .fileName, vbInformation
    Else
    MsgBox "No file selected", vbInformation
    End If
    End With
    Set dlg = Nothing
    End Sub


    With regard to the tab setting -- I'll persue your suggestion.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: References & Tab Order (WXP Access 2002)

    Did you import the module modGlobals and class module CommonDialog from the demo database into your own database?

  7. #7
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: References & Tab Order (WXP Access 2002)

    My rather embarassing answer is "No." BUT, when I did import them it started working OK!

    Thanks again,

  8. #8
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: References & Tab Order (WXP Access 2002)

    Dear Charlotte,

    Setting no tab stops on controls in the common header and footer sections seemed to solve the problem.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •