p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
I forgot my password Register Now
Register | 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 8th, 2005, 07: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.
__________________
A very grateful Scot.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 9th, 2005, 04:08 PM
Friend of Wrox
Points: 5,269, Level: 30
Points: 5,269, Level: 30 Points: 5,269, Level: 30 Points: 5,269, Level: 30
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 1 Time in 1 Post
Default

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...)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old May 14th, 2005, 07:01 AM
Registered User
 
Join Date: May 2005
Location: glasgow, , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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"
CMDialog1.ShowOpen
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
coding problem in common dialog box cancertropica Visual Basic 2005 Basics 0 July 30th, 2008 10:38 AM
Getting common dialog to work (re-install) Ragtime Access VBA 0 November 2nd, 2007 11: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 11:34 AM
Instantiating Common Dialog Box Dhodie Pro VB 6 2 July 19th, 2004 05:28 AM



All times are GMT -4. The time now is 04:25 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc