Search results

  1. D

    SQL Problem Delete Query

    Hi I’m trying to convert some old queries into VBA to be run on the Fly. I’m having a problem with this. strSQLhistory = "DELETE tblCasualtyHistory.PeriodStartDate, tblCasualtyHistory.Comment, * FROM tblCasualtyHistory WHERE PeriodStartDate >31/12/ 2004 And Comment is null;" DoCmd.RunSQL...
  2. D

    VBA SQL Autofill Table Records?

    I wish i could send you my DB for you to look at then you could see why but is 600mb big...
  3. D

    VBA SQL Autofill Table Records?

    This just fills the table with the first day of each month...If you notice at the end of the code there is a query I just used that with (datepart()) to get year and month and for end of month i used (PeriodEnd: DateSerial(Year([PeriodStart]),Month([PeriodStart])+1,1)-1) like you suggested
  4. D

    Export MS Access data to MS Excel and insert several blank rows above data

    Have you tried transfering to a blank excel sheet and then linking that sheet to the one you want. Leave the blank file hidden and never use it other than for holding data. then get it to update the main sheet within your vba..
  5. D

    VBA SQL Autofill Table Records?

    I probably took along route around here but i can only work with my own knowledge... Heres how i got around it... Just for info Sub Dan1() Dim cnEnforce As ADODB.Connection Dim rsMonths As ADODB.Recordset Dim datestart As Date Dim dateend As Date Dim strSQLNMD As String DoCmd.SetWarnings...
  6. D

    VBA SQL Autofill Table Records?

    Cheers mate ill give it a go..I didn't see it before in all the confusion
  7. D

    VBA SQL Autofill Table Records?

    I know i dont get why it has been done this way..but what is happening is there are multiple append queries going on and the only reason i can see why, is to get lots of information from lots of different tables that are unrelated to each other into one table so that it can be displayed on one...
  8. D

    VBA SQL Autofill Table Records?

    Ill try explain a bit more the DB was created by someone else who had no knowledge of vba so thay have used poorly constructed macros with long workarounds to solve simple problems.. I have re written most of it but at the core of it is this table that you manually add dates into and it is...
  9. D

    VBA SQL Autofill Table Records?

    Ill try explain a bit more the DB was created by someone else who had no knowledge of vba so thay have used poorly constructed macros with long workarounds to solve simple problems.. I have re written most of it but at the core of it is this table that you manually add dates into and it is...
  10. D

    VBA SQL Autofill Table Records?

    Hi First post here so hope the topic is in the right place. I have inherited a DB and I am trying to automate alot of old stuff and convert the macros into better functioning VBA. My problem is one of the tasks that is performed is relying on a table that simply has dates listed to drop into...
Back
Top Bottom