Solved

Open an access table in design mode

Posted on 2004-04-21
9
393 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

627 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