Advertisement

06.26.2008 at 11:06PM PDT, ID: 23520708
[x]
Attachment Details

Set default value of a textbox in a form

Asked by angie_angie in Access Forms, Hypertext Markup Language (HTML), Access Coding/Macros

Tags: MS Access, VBA

Hi Experts,

I have a form frmA. In this form I prompt the user to enter a caseID that will match to myTable.caseID.
When I click on Enter botton on frmA, another form frmB will pop up with a textbox myTextbox
I want to set the default value of this textbox to be the value of myTable.aValue that matches with the caseID that user keys in in frmA.

So I designed a query:

SELECT myTable.aValue
FROM myTable
WHERE (((myTable.caseID)=[Forms]![frmA]![txtEnterCaseID]));

This query alone works fine. But when I put it in the "Default Value" property in frmB. It doesn't work. In fact, it shows a #Name?

Can anyone help me with this?Start Free Trial
 
Loading Advertisement...
 
[+][-]06.26.2008 at 11:16PM PDT, ID: 21881276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 11:54PM PDT, ID: 21881406

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 07:57AM PDT, ID: 21884433

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 09:59AM PDT, ID: 21891403

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Forms, Hypertext Markup Language (HTML), Access Coding/Macros
Tags: MS Access, VBA
Sign Up Now!
Solution Provided By: boag2000
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628