Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. LisetteR

    How do I run a sub procedure when a form closes?

    Fantasic, thanks guys! One last problem. How do I kill the Access application as well as the database? At the moment the database is closed but leaves the Access window. Lisette
  2. LisetteR

    How do I run a sub procedure when a form closes?

    Hi, I put this in (my form is called form1): Private Sub Form1_Unload() objAccess.CloseCurrentDatabase Set objAccess = Nothing End Sub But still nothing happens when I close the form. Incidentally, when I use the following code which only uses the word Form as an identifier (not Form1) it...
  3. LisetteR

    How do I run a sub procedure when a form closes?

    Hello, beginner here. I want an Access database to be closed as a VB form is closed. Firstly I'm not sure how to call the procedure, I thought it would come under: Private Sub Form_Close() However nothing happens when I close the form, so I assume that is wrong. Secondly, I want the Access...
  4. LisetteR

    Opening an Access Database from VB

    Hi, I worked and then it stopped! This is what I have now, there are no errors and Access starts up and the form opens then Access closes itself with no error codes. Private Sub Command1_Click() Dim objAccess As New Access.Application Dim Application As String Application = "C:\Program...
  5. LisetteR

    Opening an Access Database from VB

    Thank you. That stops the Run time error 91. This is the latest code I'm trying. Private Sub Command1_Click() Dim dbMyDB As Database Dim rsMyRS As Recordset Dim objAccess As New Access.Application Dim Application As String DBEngine.SystemDB = "C:\WINNT\SYSTEM32\system.mdw" Application =...
  6. LisetteR

    Opening an Access Database from VB

    Thank you for your reply. Ok, I now have: Private Sub Command1_Click() Dim dbMyDB As Database Dim rsMyRS As Recordset Dim objAccess As Access.Application Dim Application As String Application = "C:\Program Files\Office97\Office\MSACCESS.EXE" Set dbMyDB = OpenDatabase("C:\TideWeather.mdb")...
  7. LisetteR

    Opening an Access Database from VB

    Im writing it in VB and producing an executable that checks that my database is updating a text file. If it hasn't updated for 20 minutes I want it to automatically close the access database and then re-open it. As a start I have been trying to open the database. It opens access but hangs up...
  8. LisetteR

    Opening an Access Database from VB

    Can anyone tell me why this doesn't work? I am new to VB but it seems to me that this should just work! It comes up with run time error 2486. Private Sub Command1_Click() Dim dbMyDB As Database Set dbMyDB = OpenDatabase("C:\TideWeather.mdb") DoCmd.OpenForm ("Start Sending") End Sub

Part and Inventory Search

Back
Top