Avatar of upobDaPlaya
upobDaPlaya

asked on 

MS Access Open recordset does not handle dashes

Why does MS Access handle Set rs = CurrentDB.OpenRecordset("qsReindeeers"), but it does not handle Set rs = CurrentDB.OpenRecordset("qs-Reindeeers")

I get too few parameters error...

How can I get MS Access to play nice with dashes ?
Microsoft Access

Avatar of undefined
Last Comment
upobDaPlaya
Avatar of upobDaPlaya
upobDaPlaya

ASKER

Actually the name is not the issue..I have 2 parameters within the query that properly reference the main and sub form, thus I am confused on why it does not work...  The code is called from within the main form/private sub via a command button
Avatar of Rey Obrero (Capricorn1)
Set rs = CurrentDB.OpenRecordset("qs-Reindeeers")

will just do fine..

try doing a compact and repair
ASKER CERTIFIED SOLUTION
Avatar of Nick67
Nick67
Flag of Canada 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
SOLUTION
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.
Avatar of upobDaPlaya
upobDaPlaya

ASKER

Query Def worked great..was not aware that a parameter query will not work in VBA unless I use qdef...thx !
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