SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    May 2001
    Posts
    150
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dim Test As Database

    Hello

    I am trying to add a module and a macro to an Access database that will dump Access database.

    I have found a ready code that does this and it is available on more than 40 websites.

    It uses a line like this :

    Dim Dbc as Database

    But access does not accept it and tells a user defined data type is not defined. I looked at Access examples and found that there is such a code in its own samples but it can not be executed.

    I am using Access-XP (2002).

    Regards,
    Mac

  2. #2
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    dim x as y is fairly useless (in my opinion) as you are instantiating a variable, but making it be called by another name.

    What you're seeing is simply confusing you because of the word Database in there.

    It's not creating a database, or doing anything with a database in that line.

    It is simply creating a variable named dbc which you are allowed to reference via Database.

    So, you could do dbc="hello" or Database="hello" if you so desired.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright


Bookmarks

Posting Permissions

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