Search results

  1. R

    Run-time error '3075': Syntax error in (comma)

    That was it - no parenthesis needed on the select portion. Thank you very much!
  2. R

    Run-time error '3075': Syntax error in (comma)

    Well thanks Spikepl, I have done that already; I got the error with all of the fields, so I backed it down to just one, and it worked. I add just one more, and I get the error. Which is why I posted here - not to get someone with to much time on their hands, but perhaps find someone to point me...
  3. R

    Run-time error '3075': Syntax error in (comma)

    I tried that, and I have the same error. I looked at the changed code and it appears that the last line was changed & "WHERE [tblAsset.SerialNumber]=" & "" & [Forms]![frmChange2]![SerialNumber] & "" When I look at this in the immediate window I don't have anything after the equals sign...
  4. R

    Run-time error '3075': Syntax error in (comma)

    Hello All, I am attempting to insert a record with selected data into a temp table and I am getting "Run-time error '3075': Syntax error in (comma)...". Here is the code: Private Sub XferDataToTempTable() Dim db As Database Dim strSQL As String Set db = CurrentDb strSQL = "INSERT INTO...
  5. R

    Run-time error '1004' : Microsoft Excel cannot access the file ...

    I have a form that outputs data to an excel templete. I built and tested it on my machine, and it works just fine. When I attempt to change the syntex to a network drive I get the run time error. Public Sub CreateSpreadsheet() Dim RecSet As Recordset Dim MyExcel As Excel.Application Dim...
  6. R

    Canceling Close

    I was referred over to this thread - I have one question. Where does this go: Public bPreventClose As Boolean I think it would go to a a new module, but I cant seem to get it. When I add it by itself I get an error, if I add is as a sub I get an error, if I add it as a function I get an...
  7. R

    Form field not validating

    Ahh now we are getting somewhere...I had changed the code to the field property taking it off of the form property. So once I got the code settled back in where it belongs - the message box does pop up telling me that I need to fill in the blank field. However...it looks like the rest of the...
  8. R

    Form field not validating

    It still goes merrily on its way - that didn't work. Interestingly I found if I just put a space in and try to tab to the next field, that fires the damn thing - but just tabbing past it does nothing. Rick
  9. R

    Form field not validating

    I have an inventory form where I have To and From fields (moving a device From somewhere To somewhere else). I have an unbound search field that sets up the form, and in the AfterUpdate I some house cleaning by moving the current To values to the From values, then clearing the To values with...
  10. R

    Extra records added to table

    My intent with the code below is to copy the Me.Serial value into the hostname, than check the Me.Serial value and if it begins with PDS, strip that off and write the new number as Me.Serial. What happens is I get two record sets in my table - one that has no Me.Serial and the hostname, the...
  11. R

    Insert Into Table brings up Parameter Value popup

    And that' all it took... thanks pr2-eugin!
  12. R

    Insert Into Table brings up Parameter Value popup

    I'm having difficulty with an Insert Into - I have the following code: Private Sub Serial_AfterUpdate() Dim MyDB As Database Dim hostname As String Set MyDB = CurrentDb hostname = Me.Serial DoCmd.RunSQL "INSERT INTO tblTemp (tmptoHostname) VALUES (" & hostname & ")" If Me.Serial...
  13. R

    Function value into table

    Oh my goodness, that was it!!! I had the darn thing as an integer. Thank you so much pbaldy!!!
  14. R

    Function value into table

    I tried setting db as and object, and that didn't work; I also tried adding: RecSet![tmpTechnician] = environ("username") That didn't work either; I still get: "Run-time Error '3421'; Data type conversion error." I also tried "RecSet![tmpTechnician] = ReturnUserName()" and that got the same...
  15. R

    Function value into table

    The error I get is a Run-time Error '3421'; Data type conversion error. In the line before this I put in a Debug.Print (strTechName) and I get the correct data in my immediate window. I have tried to do this with an insert query, but I couldn't get it to work, and during my research I thought...
  16. R

    Function value into table

    No that didnt fix the problem. I'm using a record set because I am adding some data that isnt in the form, but I want it in the the temp table because Im writing this to a and excel templete as well.
  17. R

    Function value into table

    ..I have changed things around and tried so many different ways to do this, I didn't notice I had the wrong string variable in the above code - I have tried it with the correct name: RecSet![tmpTechnician] = strTechName
  18. R

    Function value into table

    Hello All, I am having the worst time trying to figure out something that is so simple - but I just cant seem to get it. I have a function that grabs the user name; I am trying to use that value as data for some fields. I just cant figure out how to write that data into a record. This is what...
Back
Top Bottom