Recent content by AndrewDotto

  1. A

    Use first line of Query as Column Headers

    Hi Guys, Here's the background. I get a CSV mailed to me, it's monstrous. I have a DB that i import this CSV into, (after alot of manipulation), and then run my queries to get what i need. I've got some code that will autoimport this CSV into a table and then i can use nested queries to...
  2. A

    Changing DSN linked tables to DSNLESS tables

    Winner my friend. Thank you very much, you've made my day.
  3. A

    Changing DSN linked tables to DSNLESS tables

    Hi Guys, I have linked tables in my db at the moment that rely on user dsn connections to an SQL server. I've been reading about DSNLess connections and want to try convert what i have to have permanent DSNless connections, but the code i've found doesnt appear to be working. Could you give...
  4. A

    Not In List Name Checker

    Hiya, I've got a combo box that has the following code in the Not In List option Private Sub Operative_NotInList() Dim count As Integer Dim I As Long Dim First As String Dim Last As String Dim Tmp As String Dim Name As String Name = InputBox("Operative is not on file, Please enter...
  5. A

    Copy entire contents of a recordset to a table

    I'm not really manipulating this recordset much at all to be honest, most of it gets done in the form once it's displayed. I did think about running a straight insert into query but wasn't sure how that would fly with multiple records, some of the sets can be a few hundred lines long. And...
  6. A

    Copy entire contents of a recordset to a table

    Hi Guys, I've got the below code Private Sub WorkOrder_AfterUpdate() Dim strsql As String Dim rst As ADODB.Recordset Dim taskid As String Dim JobDesc As String Dim sql As String Set rst = New ADODB.Recordset rst.ActiveConnection = CurrentProject.Connection strsql = "SELECT...
  7. A

    openrecordset script

    Thanks for all your help guys, i've just rewritten the guys code and now it's working, thanks for all your help
  8. A

    openrecordset script

    from what i can gather it is a PRP_REFERENCE is a text field. When i write the sql statement into a basic query i enter the reference using quotes "" to surround it.
  9. A

    openrecordset script

    The SQL output needed to run is generated by the quoted code above vbaInet.... i dont know where i'm going wrong anymore
  10. A

    openrecordset script

    Right, i've got it down to this, through Google and fiddling. strSQL = "SELECT PRP_ADDRESS_1, PRP_ADDRESS_2, PRP_POST_CODE FROM TASKDBA_WM_PROPERTY WHERE PRP_REFERENCE=" & Chr(34) & [Forms]![frmemptyhomes]![PropertyRef] & Chr(34) & ";" Set rstTemp = CurrentDb.OpenRecordset(strSQL)If i comment...
  11. A

    openrecordset script

    By assigning it to the field Address, i am posting it to a local table, from a linked table within another database. I still need to know how to put a " in a vba script tho
  12. A

    openrecordset script

    Righty -o guys... i've been a fiddlin.... This is how the SQL needs to read. SELECT PRP_ADDRESS_1, PRP_ADDRESS_2, PRP_POST_CODE FROM TASKDBA_WM_PROPERTY WHERE PRP_REFERENCE="<PROPERTYREFNUMBERFROMFORM>"; to get the statement to work in an sql query, i needed to use the "".... but when i put...
  13. A

    openrecordset script

    Thanks for all this guys, After changing the string to read as suggested, the error has now changed to read "Data type mismatch in criteria or expression" When I get this running simple queries i understand it to mean i am filtering on a text string when i need a number or similar... is that...
  14. A

    openrecordset script

    Hi Guys, I'm trying to adapt some code an ex-employee has written to perform a different function, not really too crash hot with the finer points of VBA unfortunatly. Anyone have any ideas? Private Sub PropertyRef_AfterUpdate() Dim rstTemp As Recordset Dim qrydefTemp As QueryDef Dim strSQL...
Top Bottom