Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Open an access table in design mode

Posted on 2004-04-21
9
Medium Priority
?
395 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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 250 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

722 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