Recent content by alsoascientist

  1. A

    Send Pop-up message or email if a new record.

    Happy to help! :)
  2. A

    Send Pop-up message or email if a new record.

    Sorry - should read as below - when I went through to check I realised I had it all the wrong way around!! The newRecord/oldRecord are exclusive to the code so don't need to relate to anything in your table. As long as DateAdded is where you are keeping your =Now() inforamtion and the table...
  3. A

    Send Pop-up message or email if a new record.

    So assuming that you have a field for when each record is created [=Now()] then you should be able to use this: Private Sub Form_Timer() Static oldRecord As Date Dim newRecord As Date dtmLastRecord = DMax("DateAdded", "TableName") If oldRecord > newRecord Then MsgBox "There was a new...
  4. A

    Send Pop-up message or email if a new record.

    You could use the on timer event to refresh periodically using a form instead of a pop up - that way you can set it as modal and use the 'is open' property of the form to stop the automatic refresh until the user goes back in?
  5. A

    Add a pop up form on export to excel

    Thanks Pat, You're quite right - it is more excel - I have been trying to play around with using a template to export to with the code already in there but didn't realise this isn't applicable for exporting to excel. I have got around it by exporting the query to one doc, and opening a...
  6. A

    Add a pop up form on export to excel

    Hi all, I don't know if this is even possible but I thought I would put out some feelers! I have a code that creates a query from my database and uses the record source to create a new workbook in excel with that data. I then have a code that takes control of excel and does the formatting...
  7. A

    Dynamic Concatenate Function in SQL

    ok for anyone who was interested (not that I'm too sure anyone was really that clear on what I was doing!) this is now working for me :) I ended up taking apart the entire module as I blieve it was actually one of the other codes I had floating about in there that was working against this one...
  8. A

    Dynamic Concatenate Function in SQL

    Sorry for taking ages to get back - I keep getting sidetracked! I've given the code from the link a good going over and can't get it to work how I want it - maybe its actually not quite what I wanted or maybe its just cos i think I'm in a bit over my head on this one! Anyhoo... I've taken a...
  9. A

    Dynamic Concatenate Function in SQL

    Thanks again, jdraw I did have a play around with this one earlier on in trying to figure this out but had disregarded it as not being fit for purpose, however looking at it again with wiser eyes (like I said I've not tried anything like this before!) I think this may be exactly what I'm...
  10. A

    Dynamic Concatenate Function in SQL

    Thanks Pat, jdraw, spikepl, Pat and spike yeah - you are both right - when I assign the string to DuplicateStrChk it will return the actual string for each record in the query where I am looking for the result of the string (I did at one point manage to get the result of it but it was the same...
  11. A

    Dynamic Concatenate Function in SQL

    Ok so I realised that I had the str = "" commented out which is why it was creating a double string (i think) but I'm still not getting any data in the query.
  12. A

    Dynamic Concatenate Function in SQL

    Hi All, I've not tried to use a function when building an expression before so please bear with me if I am missing something obvious! I have the following function which is placed in a query to return a concatenated string depending on which comboboxes are currently visible on the form (the...
  13. A

    Null Values in Listboxes for Dynamic SQL String

    Sussed!! Managed to cobble both together for one solution - though I'm sure there is an easier way to do this! Using a row source as SELECT DISTINCT [FIELD] FROM QUERY WHERE [SFN25] <> " " UNION SELECT "<No Data>" FROM QUERY For Each ctrl In RptFrm.Controls If...
  14. A

    Null Values in Listboxes for Dynamic SQL String

    ok so I have this half sorted.... I managed to get round this using For Each varItem In ctrl.ItemsSelected If ctrl.ItemData(varItem) = "" Then varWhere = varWhere & ctrl.Name & " Is Null OR " varWhere = varWhere & ctrl.Name & "='" & ctrl.ItemData(varItem) & "' OR "...
  15. A

    Null Values in Listboxes for Dynamic SQL String

    Thanks for this sparks... I thought I had it there but maybe I'm not as sure as I thought I was about setting the reference! Could you give me a few hints?! Re the list box storing null values as 0strings, I mentioned earlier that I had set half of my dataset to "" and left the other half...
Top Bottom