User Profile
Collapse
-
You're both right. This is well above what I know but thank you anyway. -
Hi NeoPa,
Thank you for your reply which I have just seen.
My apologies if I have given you the impression I know about coding as unfortunately, I know very little (if anything). The code above I copied from a forum and made it work by changing the references to my documents, so the coding was already done. The topic you directed me to is way above anything I would know about. Is there a more user friendly topic you...Leave a comment:
-
Open an Excel spreadsheet after it has been exported from Access
Hello.
I have the following code to save my Access query, export it to my Excel spreadsheet and rename the tab:
What I would like to do is have the Excel spreadsheet open...Code:If Me.Dirty Then Me.Dirty = False End If DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "InvoiceData", "X:\Spreadsheets\Invoices\InvoiceData.xlsx", True, "DailyData"
-
Me condition not working if field is empty
I have the following code (which I gratefully learned from this website) on one of my formsThe problem I'm now encountering is (I believe) when the records in the Tenant_Contacts form are empty and the Archived field is ticked. I get the error message "Method or data entry not found". Is there a way around this as the fields in certain forms will always remain empty?Code:Me.Tenant_Contacts.Form.Archived = Me.Archived End Sub
-
Neopa, somehow I did not receive your last reply. I tried yourand this one did work for me as well.Code:=Nz([TenantRef],Nz([FileListID],Nz([AdminRef],'')))
Thank you.Leave a comment:
-
I have however put the code in an unbound text box asand it works perfectly.Code:=IIf(Not IsNull([TenantRef]),[TenantRef],IIf(Not IsNull([FileListID]),[FileListID],Nz([AdminRef])))
I have also used same code in another unbound text box for other fields as well.
Thank you for all your help.Leave a comment:
-
Phil, sorry got caught up yesterday. Put in the SQL and receiving a message saying "Syntax error in FROM clause".Leave a comment:
-
Phil, yes you are correct: if the TenantRef is Null, show FileListID, if both are Null then show AdminRef. The PropertyRef is a text box on its own.Leave a comment:
-
Hi Phil,its
...Code:SELECT [Archived Files].TenantRef, [Archived Files].From, [Archived Files].To, [Archived Files].Volumes, [Archived Files].FileNo, [Archived Files].Comments, [Archived Files].FileType, Property.PropertyRef, [Archived Files].Destroyed, Property.Town, Tenant.Company, Property.AddressLine1, Property.AddressLine2, Property.AddressLine3, Property.AddressLine4, Property.PostCode, Admin.AdminName, Admin.AdminRef, [Archived Files].FileDescription,
Leave a comment:
-
The report is based on a query of archived files. Different files have different references and file names; TenantRef, AdminRef; FileDesc, AdminName. I am trying to have all the file references in one text box and all the file names in another text box so the report can fit on a landscape A4 page.Leave a comment:
-
Sorry NeoPa.
I tried your Nz option however all I kept getting was #Type in my text box.Leave a comment:
-
Phil it is in an unbound text box in the report. It is not calculated.Leave a comment:
-
Phil, can more than one field be added or is it limited to two?Leave a comment:
-
Add info from another field if present field is empty
I would like to have a field in my report whereby if one field is empty, information from another field is inserted as it has to be either one or the other.
I have triedAll it seems to do is add in the AdminRef. Any help much appreciated. I'm sure I've done this before but cannot find or remember how!Code:=IIf([RefNo] Is Null,[AdminRef])
-
Thanks for the tip NeoPa. Will take this into my future coding escapades.Leave a comment:
-
It is "Tenant_Contact s" as in my code. I really don't know why it is a different name. Would have saved me a lot of time and effort it was!Leave a comment:
-
Got it!Thanks for the help.Code:If Me.Archived = True Then Me.Tenant_Contacts.Form!Archived = True ElseIf Me.Archived = False Then Me.Tenant_Contacts.Form!Archived = False End If End SubLeave a comment:
-
Think I've found a bit of the problem. Although my form is named subformTenantCo ntacts in the Forms window, it is called "Tenant Contact" in the Other Tab of the Property Sheet on the form. It now stalls at ".Form!" with Method or data member not found.Leave a comment:
-
The firstdid not work.Code:Debug.Print Me.suformTenantContacts.name
Leave a comment:
-
No activity results to display
Show More
Leave a comment: