how to manipulate data from a control field in access?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i wanted to use the data from a control field (eg. textbox) in a query to
generate a select statement, not using a prompt.. could someone help me?.. i
need this asap..
 
Put a reference to the control in the Criteria row of the field you want to
filter on in the query builder. You cannot use Me because the query will not
know what form it is being called from:

Forms!MyFormName!MyControlName
 
use this in the criteria of your query to limit records to a
value filled out on a form:

criteria --> forms!formname!controlname

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
SELECT Borrow.BorrowDate
FROM Borrow INNER JOIN Return ON Borrow.TransNo=Return.TransNo
WHERE Borrow.TransNo= ?????????????????????????;

? must be a value of a selected item in a combo box
note: syntax used in sql
 
SELECT Borrow.BorrowDate
FROM Borrow INNER JOIN Return ON Borrow.TransNo=Return.TransNo
WHERE Borrow.TransNo= ?????????????????????????;

? must be a value of a selected item in a combo box
note: syntax used in sql
 
1. What is the name of the form?

2. what is the name of the control with your criteria?

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
 
ok.. ive tried it already: Forms!Return!TransNo
the prob occurs when i apply this to an 'on change' event on my 'TransNo'
combo box!! i wanted to show the data involved under a primary key 'TransNo'..

knowledge is power!!..
 
ok.. ive tried it already: Forms!Return!TransNo
the prob occurs when i apply this to an 'on change' event on my 'TransNo'
combo box!! i wanted to show the data involved under a primary key 'TransNo'..

Use the AfterUpdate event (which fires when a value has been selected)
rather than the Change event (which fires at every keystroke).

John W. Vinson[MVP]
 
Back
Top