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 SkipVought 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. HaworthBantam

    Updating Recordset Not working

    Not played with Access in a while, plus I have a memory like a sieve, but is the reference to rs within the "With" block necessary ? Dim rs As DAO.Recordset, db As DAO.Database, SrchCrit Set db = CurrentDb Set rs = db.OpenRecordset("tblEngagements") DoCmd.RunCommand acCmdSaveRecord...
  2. HaworthBantam

    Running append query from external DB?

    Not sure about running a query in one Access db from another Access db, but I have run code in an Access db from a VB6 app. The code, I think, may at least give you some pointers... Dim acMyApp As Access.Application 'Create an instance of Access. Set acMyApp = New Access.Application 'Set...
  3. HaworthBantam

    Intercept Error Msg

    Or, for completeness... Test Sub() On Error Goto ErrorTest_1 'Your code here Exit Sub ErrorTest_1: Select Case Err.Number Case 3274 MsgBox "This excel file has been changed to by someone; the columns don't match the table it goes into." & vbCrLf & vbCrLf & "Error Number " &...
  4. HaworthBantam

    Yet another 2501 error..

    I've not read any other threads on this topic (I usually lurk around the VB6 forum), so I'm not sure what's already been discussed, but I've had experience of this "2501 - The Open Report Action was Cancelled...", and it drove me up the wall because nothing seemed obviously wrong. My "solution"...
  5. HaworthBantam

    Application installation/update

    My method of updates is for my app to check the date of creation of the version held on the server at start up. If it's different from the local version then it opens a batch file and closes itself down. The batch file then copies the new version to the local machine, overwriting the original...
  6. HaworthBantam

    Import Spreadsheet with variable name

    Ok, this should be pretty straight forward, you'll need to set a reference to the "Microsoft Office 11.0 Object Library". Choose "Tools" from the menu bar and then "References". A References dialog box will appear. Scroll down the list until you come across the library above and put a check in...
  7. HaworthBantam

    Import Spreadsheet with variable name

    Have a look at the FileDialogue box in help. I don't have any code handy, but using this your user(s) should be able to browse to the file (whatever it's name) to be imported. You can then determine the name of the file selected, and import the data. Hope this helps.
  8. HaworthBantam

    help with adding buttons to form "print and email"

    You might be better off posting this in the VBA forum. However, I had a similar problem not so long ago - the mailing, not the printing. I (not being a Word expert) ended up saving the document to the C drive of the local machine and then attaching it to the outgoing mail. You could then...
  9. HaworthBantam

    Need to update records if Report is opened in Normal mode

    Quite a while since I've used Access so I could be barking up the wrong tree here but, I think you'd need to use your own menu bar rather than the Access default. have the print option in your own menu bar and capture that event.
  10. HaworthBantam

    Automatic update database problem.

    Oops, varBatchFile line should read: varBatchFile = Shell("[pathway to batch file]", 1)
  11. HaworthBantam

    Automatic update database problem.

    Dim varBatchFile Make the check to see if the file needs updating, if it does then... varBatchFile = Shell("[pathway to batch file]") Quit To ensure that the batch file allows the time required for Access to shut down, place a Pause withing the batch file before the copy occurs. Once...
  12. HaworthBantam

    Check for updates feature: Best way to go about adding

    A simple solution that I use is for the app to check the date/time stamp on the local exe file and compare it to the master file on the server. If it's different then it closes itself down immediately after opening a batch file. The batch file replaces the file on the workstation with the one...
  13. HaworthBantam

    Open Word Template, create new document

    You could try... Dim wdMyApp As Word.Application Dim wdMyDoc As Word.Document Set wdMyApp = New Word.Application Set wdMyDoc = wdMyApp.Documents.Add("[Pathway here to your template]") wdMyApp.Documents(wdMyDoc).Activate 'Make the word doc Active ' ' 'Do whatever you need to...
  14. HaworthBantam

    Printer Object Equivalent in dot NET ?

    Thanks for the advice guys. Because of the urgency of the project I'm working on, I think I'm going to write this current project in VB6. And then look at rewriting in dot NET at a later date, when time isn't too much of a factor. Thanks again.
  15. HaworthBantam

    Printer Object Equivalent in dot NET ?

    Folks, I've been looking at this for a while now and I appear to be going round in circles, so any help would be greatly received. I'm looking to print records from a data table. My VB6 code is: Public Sub PrintRecord() Dim strMySQL As String Dim dbTest As Database Dim rsTest As Recordset...
  16. HaworthBantam

    Connecting Vb to Access

    Mad, That's a question with many answers. I've just moved over to VB.net myself from VB6 in the last month, and linking to and creating "recordsets" from Access databases was one of the first things I had to get to grips with. So far I've come up with 5 different ways of generating datasets...
  17. HaworthBantam

    Hide Close Button But Leave Minimise and Maximise

    I don't believe that you can hide the close button on the form without also hiding the minimise and maximise buttons. You can, however, "disable" it by Canceling the forms Closing event. Remember though that your user(s) will need some method of closing the form - a variable containing a value...
  18. HaworthBantam

    Thanks to RiverGuy

    Modest as well. I note that the contributors included ThatRickGuy, another upstanding member of the Tek Tips community. However, your solution was elegant and filled me with a warm glow that only particularly sexy code can instil. I hope my other half doesn't get to read this, she may have an...
  19. HaworthBantam

    Thanks to RiverGuy

    Found a posting you made 2nd Dec 2004 regarding splash screens and some code for displaying the splash screen and then the main form..... Sub Main() Dim fs As New FormSplash() fs.Show() : Application.DoEvents() Threading.Thread.Sleep(3000) fs.Close() Dim...

Part and Inventory Search

Back
Top