Any help would be much appreciated. What I basically want to do is import data from a spreadsheet and if it already exists (based on the primary key value) overwrite it. If data in the table does not exist in the spreadsheet I want it to remain there. Most of the solutions I have come across...
Hi,
Basically I have a macro that runs the TransferSpreadsheet action to import data from an Excel file. As it stands if the field containing the primary key already exists it will flag an error message and not import that record. What I want to do is overwrite the current record with the new...
Hi Spike,
That works perfectly, thankyou. I do however now have another problem.
When I substitute my 'test' macro (which just contained a msgbox as a proof of concept) with the intended macro it says that I am making an illegal function call.
The macro is linked to a button (Command60)...
Ok, I have it running now using the below code but still can't work out how to test for an open session of Access and only create one if it is not already open, otherwise sub routine in the current session?
Sub RunAccessMacro(MyMail As MailItem)
Dim LPath As String
Dim LCategoryID As Long...
Hi,
Currently I have a rule within Outlook to move mails meeting certain criteria to a specific folder and display a msgbox confirming that a new mail (which contains a report in text file format) has been received. I then run some code within Access which downloads the text file attachment...
Hi,
I have the following code which downloads any email in a specific inbox sub-folder to a specified location and then deletes it. It works fine when I call the sub routine directly from Outlook, but when put the code into a module in Access it says there is a compile error and that the...
Do you see anything wrong with the syntax here?
Select Count(iif(Status = 'Sed - T+ 0',1) as expr1, Count(iif(status Is Not Null AND status <> 'Cancelled',1) as expr2, expr1/expr2 as expr3
From P_T
WHERE Bwer = Bwer = Forms!Stats!Combo2;
Hi,
I'm struggling with the correct syntax for this, but ideally what I want to achieve is:
SELECT (SELECT Count(Status) FROM P_T WHERE 'criteria are met') / (SELECT Count(Status) FROM P_T WHERE 'different criteria are met')
They are both fairly simplistic select statements, so I imagine...
Here's where I'm at with it now. I have a form that contains nothing but a combobox, which contains all possible values for the borrower field in the table Pnd_Trades. What I want to do is select a borrower from the combobox and then get it to launch a report based on the below query:
SELECT *...
Hi Bob,
Thanks for getting back to me, it seems to like to code but cannot find the file? I have returned the User_FX variable to a msgbox and it is 'Administrator' and the file is saved as C:\Options\G_Reports\G_Reports_Administrator.xlsx so i'm not sure what the issue is, any ideas?
Hi,
I'm trying to delete a file that uses the user's windows login id as a variable in the file name but am having a little trouble. I think I'm nearly there... I've assigned the windows login ID to the string User_FX with a function and have written the following code, but it returns an error...