Search results

  1. C

    Listbox value to array to table

    Hi Thanks for your reply. I was thinking an array as I am not able to save the policy numbers to a table until I have the error id which will be generated after adding policy numbers and logging the error. Otherwise how could I get the data from the list box and into the table with the...
  2. C

    Macro/Module Issues

    Do you have an example of the file path you are trying to pass into the function? Was the DB built in 2007 or 2010? Even though 2007 is accdb it sometimes wont open accdb created in 2010 giving the error message above. Can I ask why you are using a function also? A sub routine would be...
  3. C

    Login Form Error

    I have tried to recreate the error with no success as my forms are closing using the same code. I thought it might be the space in the name of the form but it isn't. Might seem simple but have you spelt it correctly? Could you attach a copy of your DB for us to test it on our machines to...
  4. C

    Listbox value to array to table

    Hi All I have a little problem I am struggling to work out how to do. I think I know the way it should be done (please correct me if I am wrong) but not sure where to start with code: I have an application that logs errors for my department, on the logging form there is a number affected...
  5. C

    Code sending two emails and shouldn't be...

    Thanks for the pointer - I have moved the creation and descruction out of the loop. It would appear that my outMail.From tag was causing it to send twice moving the destruction etc highlighted it as unsuported.
  6. C

    Code sending two emails and shouldn't be...

    Hi Code in tags above. I have tried a number of debugging techniques, I have copied and pasted the sql into Qery Design which gives only one record, i have inserted a breakpoint on the function then stepped through - it only loops through onces as it should however it is still sending two...
  7. C

    Code sending two emails and shouldn't be...

    Public Sub SendBreachEmail() On Error GoTo ErrSendBreachEmail: Dim LoggedArea1 As String Dim LoggedArea2 As String Dim LoggedTeam1 As String Dim LoggedTeam2 As String LoggedArea1 = Form_frmLogBreach.cboAreaCaused1 LoggedArea2 = Nz(Form_frmLogBreach.cboAreaCaused2...
  8. C

    Code sending two emails and shouldn't be...

    Hi, me again! I have the following code that pulls the logging users area, team, manager and email so that it can notify them of the error that has been logged. It all works, which is good however it is sending the email twice!! I have tested the SQL in Query Design and it only pulls one...
  9. C

    Really simple help needed.....

    Solved it.
  10. C

    Really simple help needed.....

    Solved it!! Paul - thanks very much for your help. In my table the field name holding the date was labelled date. i guess as this is a reserved word it did not like it - it normally tells you off for doing so but not on this occassion. I have remained to DateLogged and used #Date# in the SQL...
  11. C

    Really simple help needed.....

    Oh yea newbie error. That still doesn't resolve the error however if I tell it not to insert the date then all works ok....
  12. C

    Really simple help needed.....

    Paul, no it doesn't work that way either. Table design: ID - Autonumber ErrorID - Number Description - Memo LoggedBy - Text Date - Date/Time with Format of Short Date Module - Memo Subroutine - Memo
  13. C

    Really simple help needed.....

    If I type in Date() it automatically removes () when I move from the line.
  14. C

    Really simple help needed.....

    This is what the immediate window is giving me: INSERT INTO tblErrors (ErrorID, Description, LoggedBy, Date, Module, SubRoutine) VALUES ('11','Division by zero','Windows 7',#27/12/2011#,'mdlDatabaseActivity','ForcedError')
  15. C

    Really simple help needed.....

    Michael, where is the double quote in the statement? I can not see it.
  16. C

    Really simple help needed.....

    I have tried: (in case i wasn't clear and it is relevant 'Date' is referencing to the internal function) Date 'Date' #Date# Format(Date,"dd/mm/yyyy") Format(Date,"mm/dd/yyyy") .... In my other SQL statement / sub routine that works is using Format(textbox where value is, "dd/mm/yyyy"). Im at...
  17. C

    Really simple help needed.....

    Hi paul Thanks for getting back to me. I have narrowed it down to the Date input, the string works without. The date field in the table is set to Short date as it my other input tables so not sure why it isn't working - I would like it to add the current date....
  18. C

    Really simple help needed.....

    I can not for the life of me see what is wrong with this, can someone else?? Dim LogError As String LogError = "INSERT INTO tblErrors (ErrorID, Description, LoggedBy, Date, Module, SubRoutine) " LogError = LogError & "VALUES ('" & mdlDatabaseActivity.ErrorID LogError = LogError...
  19. C

    Should be asimple VBA SQL query

    Paul - I cant believe it was so simple, it was only so I could check it was returning the expect number. i guess I could have iterated through to get the same result. Thanks Carl
  20. C

    Should be asimple VBA SQL query

    Hi I have built a query in the design view in Access and the query works but when moving it into VBA it doesn't! I have a form that logs an error and the user can select two areas and two teams if they want. (Second is optional) When they log it I want to retrieve the email from tblUsers of...
Back
Top Bottom