Search results

  1. L

    Export to Excel changes format from number to text

    Problem solved! The query was formatting the numbers to #,### which has caused the data to be text in Excel.
  2. L

    Export to Excel changes format from number to text

    I dont think this resolves the issue. The table in Access is number format. I use CurrentDb.OpenRecordset to copy the data from Access to Excel. When I use the data in Excel I have to use Text To Columns to be able to use the data in pivot tables etc.
  3. L

    Export to Excel changes format from number to text

    Thanks - Ill have a look through
  4. L

    Export to Excel changes format from number to text

    Hi all, Ive tried searching for an answer to this but it seems there isnt on (that I can find). I have some code that exports data from Access to Excel. The data in Access is numer formatted. hen Excel opens, the data has changed to text which the pivot tables wont show (unlss I use text to...
  5. L

    Runtime 7874

    I keep my SQL in VBA to stop other users changing the queries (They take copies then fuss when they break it). Anyway... I fixed the problem - I was being a plum with my variable.
  6. L

    Runtime 7874

    Hi all, I'm having a problem with Runtime 7874 (Cant find the object INSERT INTO...). I run all my queries from VBA but haven’t come across this yet. The query runs perfectly from Query Design, but debugs when running from VBA. Can anyone see whats wrong? Thanks for any help. --- SQL...
  7. L

    Cbo box defualt value

    Hi All, I have a cbo box with user names in. It has 2 columns (showing actual name and user name), and I have included an “All” option (its based on a union query). The “All” option returns the value “*”. When a user opens the database, the cbo box defaults to their name. Bu I want to amend...
  8. L

    Access to Outlook .AllDayEvent

    I managed to get around this issue by using the DateAdd function so the start and end times were not the same. .Start = Dte .End = DateAdd("h", 1, Dte) Now it works for me
  9. L

    DCount Criteria

    Thanks Plog thats exactly what I needed. Sorry for generic names but I can't post anything that might reveal my companies identity.
  10. L

    DCount Criteria

    Hi All, I'm having trouble with a DCount – Clearly I've not got it right. Please can someone advise how I should change this? Thanks DCount('MyField','MyTable2','Month=[MyTable1].[Month]')
  11. L

    Import external ACCDB/MDB without specifying table name

    Hi all, This should be simple but... I have an automated function to import external Access tables to my database (there is only ever 1 table in the external ACCDB/MDB), BUT the names of the external tables are different. How can I import a table without specifying the name? (ie default...
  12. L

    Date only in variable

    Hi all, Im having a problem with a date in a variable. I have an automated Outlook calendar entry which is set to All Day, but when it runs its still showing start and end times (not in the All Day format). The table/field where the date is stored is formatted to ‘DD MM YYYY’. I've read...
  13. L

    Using LIKE with a function

    Excellent! Thanks guys - Just what I needed!
  14. L

    Using LIKE with a function

    Sorry I didnt realise the code had split like that. For example, I have a table with fields Task and AssignedTo. The task may be assigned to multiple people which shows like: Person1/Person2/Person3. I have used this before with a combobox as query criteria and it works well but I now want the...
  15. L

    Using LIKE with a function

    Morning all, Please can someone tell me if its possible to use LIKE and a function as a query criteria? My function is: Public Function User() User = VBA.Environ("UserName") End Function And my query is: SELECT tbl_REF_Reminder.Type, tbl_REF_Reminder.PIC, tbl_REF_RMOPIC.[UN Code]...
  16. L

    Looping through a table

    Please ignore the last post - wasnt thinking! Realised now using ReminderText = ReminderText & RS![Agent] & Chr(13) & RS![Agency] & Chr(13) & RS![Type] & Chr(13) & Chr(13) Thanks again :)
  17. L

    Looping through a table

    Thanks for that. User is a function that detects the log in user name. Can Dlookup be used with this? Code below as an example: Public Sub Reminder() Set RS = CurrentDb.OpenRecordset("qry_REF_Reminder", dbOpenSnapshot) If RS.RecordCount > 0 Then RS.MoveFirst ReminderText = "" Do While Not...
  18. L

    Looping through a table

    Thanks. I already have the query which filters the current date and user.
  19. L

    Looping through a table

    Thats whats im trying to do. The only thing im having trouble with is loopiong through the table that holds the task name and due date.
  20. L

    Looping through a table

    Its just a message box to remind users what tasks are due on the current day. When they log in it will give a message box with 5 or 6 lines saying the task name. I just need to loop the code so that I can shor more than the first record.
Back
Top Bottom