Using MS Access/Query Criteria

Advertisement


Question
Hi,

I have a question, I am trying to link a query's criteria to a form, so that when I type a number into the form, that number will be my criteria when I activate a query.I tried building different expressions in the criteria and I also have a form with a textbox which the user can key numbers into, but I am having trouble trying to get that to work. Hopefully you can help. Thanks in advance.

Answer
You can reference a value in a control on an open form using the syntax:

Forms!formname!controlname

where formname is the name of your form and controlname the name of the control who's value you want to reference.

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

©2012 About.com, a part of The New York Times Company. All rights reserved.