Avatar of Steve Gilbert
Steve Gilbert

asked on 

Invalid use of ' (dot)

Hi,
MS Access 2013, Windows 10 set up
I'm trying to export a report to Excel by right-clicking in the body of the report & selecting "Export", "Excel" but I'm getting the error "There is an invalid use of the . (dot) or ! operator or invalid parentheses". I'm attaching a screen-shot of the error - can anyone help please?User generated image
Windows 10Microsoft AccessMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Steve Gilbert
Avatar of Paul Cook-Giles
Paul Cook-Giles
Flag of United States of America image

I've never gotten that error, but if I did, my troubleshooting process would start by working through these questions:
Can you export any report to Excel?
   (if you can, what's the difference?)
Can you export to a different folder?
"                                                   filename?
"                                                   file extension (that is, "xlsx" rather than "xls"?)

Let us know what you learn...
Avatar of Brian B
Brian B
Flag of Canada image

Just a thought, but any chance your currency settings are different? Sometimes the separator between dollars and cents is a comma rather than a dot.
Avatar of Steve Gilbert
Steve Gilbert

ASKER

Paul - thanks for the response. Yes, I can export other reports successfully. I tried using the file name of a successful export as the file name for the problem report but got the same error. On the export dialogue box I'm not given the option for ".xlxs" files, just 2 options for "Excel 97-Excel 2003 *.xls" and "Excel 5.0/95 (*.xls) both of which I've tried but still get the error
Brian - my currency is Pounds Sterling and the separator is always "."
Thanks for your help & time, appreciate it
Hm.  Can you export the report's query?
If not, try rebuilding the query ( one table added/one column added at a time), and see where the export stops working; that might provide a clue as to the issue.
If you can export the complete set of query results, try rebuilding the report, adding one field at a time, and see where the export stops working.

Keep us apprised of your progress;  this is very interesting.  :)
Avatar of Steve Gilbert
Steve Gilbert

ASKER

Hi Paul, yes I can export the query OK - I'll try your suggestion of rebuilding the report & let you know. Thanks again for your help
Progress!  :)
Avatar of Steve Gilbert
Steve Gilbert

ASKER

OK - the problem appears to be the date parameters that are entered on a pop-up form before the report is opened - they are shown in the heading of the report on my original question and removing these allows the export to run OK.  
The dates are used to filter the recordset, the SQL from the query in the report is as below:
SELECT Clients.First_Name, Clients.Lead_Name, Payments.payDate, Payments.payAmount, Bookings.bkgStatus, payment_catg.payment_catg_ID, payment_catg.payment_catg, quotations.qtFrom_Date
FROM quotations INNER JOIN ((Bookings INNER JOIN Clients ON Bookings.Client_ID = Clients.Client_ID) INNER JOIN (payment_catg INNER JOIN Payments ON payment_catg.payment_catg_ID = Payments.payment_catg_ID) ON Bookings.Booking_ID = Payments.Booking_ID) ON quotations.Quote_ID = Bookings.Quote_ID
WHERE (((Payments.payDate) Between [Forms]![frmDateSel]![frDate] And [Forms]![frmDateSel]![toDate]))
ORDER BY Payments.payDate;
Hi,

Make sure you validate user input before filtering (you expect a date, ensure input is a date).
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Perhaps an expression/controlsource where you use tablename!fieldname in favour of tablename.fieldname - or vice versa.
ASKER CERTIFIED SOLUTION
Avatar of Paul Cook-Giles
Paul Cook-Giles
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Steve Gilbert
Steve Gilbert

ASKER

Thanks so much Paul for walking me through this, I wouldn't have solved this without your advice.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo