No Default Value

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Trevor Hughes
Junior Coder
Posts: 25
Joined: Sun Dec 15, 2013 9:27 pm

No Default Value

Post by Trevor Hughes » Tue Feb 16, 2016 7:08 pm

Hello

I am experiencing a problem with a query referenced by a script I am running.

The error is:
Error in: B2B Lodgement
Line: 10 - Parameter
[Forms]![Goods]![Test environment] has no default value

This relates to a Microsoft Access query which is referencing a field on a form.
DBQuery>GoodsTesting,Select * From qryXMLLodgementsImportExport,rDEC,NumRecs,NumFields,0

If I remove the form reference the script works fine.

Can anyone suggest a solution to this problem.

Any help would be appreciated.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: No Default Value

Post by JRL » Thu Feb 18, 2016 2:09 pm

Can you query a form? Am I missing something? In my experience you would query a table. A form is a method to view the contents of a table usually one record at a time.

What part of the DBQuery> line is the "form reference" that is removed to make the script work?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: No Default Value

Post by Marcus Tettmar » Tue Feb 23, 2016 4:45 pm

As JRL says, Macro Scheduler has no knowledge of your "form" and can't query it. It can only query a table or query.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts