Solved

Open an access table in design mode

Posted on 2004-04-21
9
392 Views
Last Modified: 2012-08-13
I have an access database (freeware) which I can add data in using the switchboard manager and I can see the underlying tables with Crystal Reports, but I need to be able to load data directly into the tables using the external import function.


The trouble is I cannot see the tables in design view.  Where do I go to turn this function on?

Cheers
bernard
0
Comment
Question by:BernardGBailey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 10876843
Hi,

Does anything 'happen' when you use [F11] whilst viewing the Switchboard Manager?

BFN,

fp.
0
 
LVL 16

Expert Comment

by:ahmedbahgat
ID: 10876867
you may try to link to the tablles from another database

cheeds
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 10876905
just out of curiosity, can you list the tables in VBA

e.g. place code in a module and try run it , results placed in intermediate window

Public Sub ListTables()

    Dim i As Integer
   
    On Error Resume Next
   
    Debug.Print "***********************************"
    Debug.Print "LIST OF TABLES/FIELDS"
    Debug.Print "***********************************"
    For i = 0 To CurrentDb.TableDefs.Count - 1
        Debug.Print "Table: " & CurrentDb.TableDefs(i).Name
    Next
   
End Sub
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 10876958
PS.

Assuming the "AllowBypassKey" property has not been set, can you 'access' (ahem) the tables directly if you hold down [SHIFT] whilst double-clicking on the ".mdb" file in Windows Explorer?

BFN,

fp.
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 10876972
Sorry, that should've been...

...the "AllowBypassKey" propery has been set...


Interesting article here:

[http://www.mvps.org/access/api/api0068.htm]

"If the AllowBypassKey has not been set, then the 'Shift' key can be programmtically pressed when the database is opened programmatically through Automation code.  To get a reference to a hidden instance of Access with the database in which you wanted to bypass the Autoexec macro, you can use this function."

********* Code Start ***********
' This code was originally written by Dev Ashish.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
'
' Code Courtesy of
' Dev Ashish
'
'
Private Declare Function SetKeyboardState _
    Lib "user32" _
    (lppbKeyState As Any) _
    As Long
   
Private Declare Function GetKeyboardState _
    Lib "user32" (pbKeyState As Any) _
    As Long

Private Declare Function GetWindowThreadProcessId _
    Lib "user32" _
    (ByVal hWnd As Long, _
    lpdwProcessId As Long) _
    As Long

Private Declare Function AttachThreadInput _
    Lib "user32" _
    (ByVal idAttach As Long, _
    ByVal idAttachTo As Long, _
    ByVal fAttach As Long) _
    As Long

Private Declare Function SetForegroundWindow _
    Lib "user32" _
    (ByVal hWnd As Long) _
    As Long

Private Declare Function SetFocusAPI _
    Lib "user32" Alias "SetFocus" _
    (ByVal hWnd As Long) _
    As Long

Private Const VK_SHIFT = &H10
Private Const VK_LSHIFT = &HA0
Private Const VK_RSHIFT = &HA1

Function fGetRefNoAutoexec( _
                        ByVal strMDBPath As String) _
                        As Access.Application
On Error GoTo ErrHandler
Dim objAcc As Access.Application
Dim TIdSrc As Long, TIdDest As Long
Dim abytCodesSrc(0 To 255) As Byte
Dim abytCodesDest(0 To 255) As Byte

    If (Len(Dir$(strMDBPath, vbNormal)) = 0) Then
        Err.Raise 53
    End If

    Set objAcc = New Access.Application
    With objAcc
        .Visible = True

        ' attach to process
        TIdSrc = GetWindowThreadProcessId( _
                            Application.hWndAccessApp, ByVal 0)
        TIdDest = GetWindowThreadProcessId( _
                            .hWndAccessApp, ByVal 0)
               
        If CBool(AttachThreadInput(TIdSrc, TIdDest, True)) Then
            Call SetForegroundWindow(.hWndAccessApp)
            Call SetFocusAPI(.hWndAccessApp)
           
            ' Set Shift state
            Call GetKeyboardState(abytCodesSrc(0))
            Call GetKeyboardState(abytCodesDest(0))
            abytCodesDest(VK_SHIFT) = 128
            Call SetKeyboardState(abytCodesDest(0))
       
            ' Open a mdb with Autoexec
            Call .OpenCurrentDatabase(strMDBPath, False)
           
            ' Revert back keyboard state
            Call SetKeyboardState(abytCodesSrc(0))
        End If
        ' release
        Call AttachThreadInput(TIdSrc, TIdDest, False)
        Call SetForegroundWindow(Application.hWndAccessApp)
        Call SetFocusAPI(Application.hWndAccessApp)
       
    End With
    Set fGetRefNoAutoexec = objAcc
    Set objAcc = Nothing

    Exit Function
ErrHandler:
    If (TIdDest) Then Call AttachThreadInput(TIdSrc, TIdDest, False)
    Call SetForegroundWindow(Application.hWndAccessApp)
    With Err
        .Raise .Number, .Source, .Description, .HelpFile, .HelpContext
    End With
End Function
'********* Code End ***********


BFN,

fp.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 10877138
Hmm, although it's freeware, the author might have hidden the tables to protect some of the features.
Why not contact the author directly and/or post the link to the download site here ?

Nic;o)
0
 
LVL 1

Expert Comment

by:jezskill
ID: 10878975
would be handy to see the freeware access db so as to see if the author of the db has limited views and functionality to the user
0
 
LVL 35

Accepted Solution

by:
[ fanpages ] earned 125 total points
ID: 11387208
I respectfully suggest the question be closed & points awarded accordingly.

Thank you.
0
 

Author Comment

by:BernardGBailey
ID: 11392921
Whilst I did not use your solution, I was able to open the database with a new version of the code

Cheers
Bernard
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question