Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 8th, 2005, 06:21 AM
Registered User
Join Date: May 2005
Location: glasgow, , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using common dialog with access

I am linking a address book database to a vb form using common dialog but have got stuck. Please could you take a look and see if you can help.

How do I open a specific access file using the common dialog function? I presume it needs to be automatically displayed in the file name of the open file box.

Also I want to be able to either open it at the beginning of the file or create new record by opening at the end of the file. I have created a menu with new and open for this purpose but can't find the code I need.

Thanks for looking

A very grateful Scot.
Reply With Quote
  #2 (permalink)  
Old May 9th, 2005, 03:08 PM
Friend of Wrox
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

Be glad to look; could you post something to look at?

Are you trying to open a database (*.mdb)?
Is so, are there more than 1 database that might be what the user is looking for? (Seems more than 1 table within 1 database would be less messy, but even that seems unnecessary...)
Reply With Quote
  #3 (permalink)  
Old May 14th, 2005, 06:01 AM
Registered User
Join Date: May 2005
Location: glasgow, , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks. I specifically need to open a db file called address. On Private Sub mnuNew_Click()I need to open it to eof and on Private Sub mnuOpen_Click()I need to open to bof.

I have so far

f = FreeFile
CMDialog1.Filter = "all files|*.*|text|*.txt"
CMDialog1.FilterIndex = 0
CMDialog1.FileName = "C:\Address"
MsgBox "You selected: " + CMDialog1.FileName
TextFileNum = FreeFile
OpenFileName = CMDialog1.FileName
Open OpenFileName For Output As #f

Also are there any good tutorial sites on common dialog and linking db's to access via code (not data control).

Thanks for your help

A very grateful Scot.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
coding problem in common dialog box cancertropica Visual Basic 2005 Basics 0 July 30th, 2008 09:38 AM
Getting common dialog to work (re-install) Ragtime Access VBA 0 November 2nd, 2007 10:59 PM
How to use the flags int common dialog box diegoblin Beginning VB 6 2 November 8th, 2006 03:41 PM
Access db/ Common Dialog/ errors in code azkabancells VB Databases Basics 1 May 25th, 2005 10:34 AM
Instantiating Common Dialog Box Dhodie Pro VB 6 2 July 19th, 2004 04:28 AM

All times are GMT -4. The time now is 03:20 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.