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.
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...
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.
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...
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...
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
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]')
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...
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...
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...
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]...
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...
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.