Search results

  1. J

    Solved Running SQL Update Via VBA

    I will make the above suggested change, but what about the rest of the code not running as I needed/
  2. J

    Solved Running SQL Update Via VBA

    I am trying to run this: UPDATE tbl_test SET tbl_test.received = 'sent', tbl_test.received_Date = Date() WHERE tbl_test.received Is Null AND tbl_test.received_Date Is Null AND tbl_test.supCheck Is Not Null AND tbl_test.reasonOrdered = 'Customer Order' OR tbl_test.reasonOrdered = 'Restock' OR...
  3. J

    Help With VBA

    I have so far written this code: Workbooks.Open Filename:="C:\Testing\Test.xls" With Sheets(Array("Sheet1", "Sheet2")).Select Range("A1:EZ48").Select ActiveWindow.SelectedSheets.Copy ActiveWorkbook.SaveAs Filename:="C:\Testing_Spreadhseet" & ActiveWorksheet.Name & Format(Date, "mmddyyyy") &...
  4. J

    Pass Value from One Query to the next

    I am familiar with dao. I will have to play with the query refs objects I think it would be something similar to querydefs(parameter1, parameter2). But I could be totally wrong.
  5. J

    Pass Value from One Query to the next

    Yes. When I run the query it asks for the start date then the end date.
  6. J

    Pass Value from One Query to the next

    I have about 20 queries that I run on a daily basis. Currently I have to open each database individually and enter the begin date (monday) and the end date (sunday). My question is, I want to build a form, and write some VB code that would run each query one by one and then display the results...
  7. J

    You Must use dbseechanges option with openrecordset Error

    Disregard, I added + dbSeeChanges to the end of the dbfail statement and now it is running like a dream!! For anyone else experiencing the same problem the code should read like this: 'Opening the Database Set db = DBEngine.Workspaces(0).OpenDatabase("C:\Test\Test123\Test123db.mdb") 'Running...
  8. J

    You Must use dbseechanges option with openrecordset Error

    I am trying to run queries in other databases by using the following code: 'Opening the Database Set db = DBEngine.Workspaces(0).OpenDatabase("C:\Test\Test12\Testdb.mdb") 'Running specified queries db.Execute "qry_try_This", dbFailOnError Set db = Nothing But I keep getting the error of: Run...
  9. J

    On Click Event

    VilaRestal - that is a great idea, I hadn't even thought of starting fresh with a new db each day! As far as calling the function I will test that this afternoon (when I have a free moment to try it) by it looks like you are saying use an if/then statement beginning with this: If Not...
  10. J

    On Click Event

    This code will be executed by one person, as the onclick event. They are the only user that can see this button. I think I now understand what you are meaning. If I add boolSuccess = ExportAndDeleteCustomerObjects strCustomerNumber To the beginning of the function, then once I call the...
  11. J

    On Click Event

    Use something like: boolSuccess = ExportAndDeleteCustomerObjects strCustomerNumber I am not following what this code says at all?? Can you elaborate please?
  12. J

    On Click Event

    Galaxiom - thank you for the insight. I changed all instances of Application.CurrentData.AllForms to this: CurrentProject.AllForms But still when I attempt to call this function using this code: Call Call ExportAndDeleteCustomerObjects I get an error that says Compile Error Argument...
  13. J

    On Click Event

    Yes, it has been on my "death row" list since I took this position!!! If I can figure out how to call the function posted by VilaRestal I will be able to implement this "band-aid" tomorrow and have a new, fresh, clean, designed correctly db working next week!!!!
  14. J

    On Click Event

    Galaxiom -- the current db structure is deathly ill. It is crashing some days, 15 - 20 times a day, thus making backups be performed every 30 minutes (SUCH a waste!) and when the db crashes, having to revert to a backup, which again wastes time! As I stated a few posts earlier, I am solely...
  15. J

    On Click Event

    I understand what the function is doing, it is IMO actually quite a simple yet intricate code that performs all of the requested things I need done (at least temporarily). My only questions is how to call it? I have only worked with calling functions where inputting Call *Input the name of the...
  16. J

    On Click Event

    Yes, let me know how to "pull the pin." That is a funny analogy to use, spikepl!
  17. J

    On Click Event

    I input the Function that you wrote, but when I try to call the function as my onclick event, it gives me the Compile Error: Argument Not Optional. Private Sub Command8_Click() Call ExportAndDeleteCustomerObjects End Sub There may be other parameters needed in the Call Request, but this is...
  18. J

    On Click Event

    I added this line of code to my db, it debugs fine, but when I go to execute the code I get this message.... "Object doesn't support this property or method" Is this because there is a VB reference that needs to be installed that I haven't or did I leave a line of code out????
  19. J

    On Click Event

    Private Sub Command80_Click() DoCmd.TransferDatabase acExport, "Microsoft Access", "D:\temp\my_data.mdb", acQuery, "Q_Books", "q_test", True End Sub This code almost does what I need it to, but here is a problem I run into with this,,,,a would need the code to take the customer# from the...
  20. J

    On Click Event

    VilaRestal --- just quick glance that site looks like it covers what I am attempting to accomplish for the time being. All, thanks for your help, and thanks for ideas as well on how to properly set up the "new" db.
Back
Top Bottom