Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening form using a specific record. 2

Status
Not open for further replies.

metalboy

Technical User
Apr 1, 2004
97
GB
I have a dbase which logs sales in a call centre. on team enters the sales while another team verifies them. I need to be able to have a facility where by you can enter the sales id into a form and it brings up all the details of that sale. my sales id is the primary key.

Thanks in advance!

Regards

Alex

“It is a mistake to think you can solve any major problems just with potatoes.”
Douglas Adams
 
Hi metalboy,

you can either, build a query as the source for the form with a where statement along the lines of...
Code:
WHERE YOUR_TABLE.SALES_ID = [Forms]![YOUR_FORM].[YOUR_TEXT_BOX]
and requery the form on the after update event of your text box -

or, on the after update event of your text box you can filter the form...
Code:
me.filter = "YOUR_TABLE.SALES_ID = " & me.YOUR_TEXT_BOX    ' assumes numeric id
me.filteron = true
you can also add a button to turn the filter on/ off as required (soemthing like... me.filteron = not me.filteron)

HTH, Jamie
FAQ219-2884
[deejay]
 
Thanks Jamie!

Regards

Alex

“It is a mistake to think you can solve any major problems just with potatoes.”
Douglas Adams
 
How are ya metalboy . . . . .

Normally, I would do the same as [blue]jksmi[/blue] only with a combobox based on your Sales ID.

cal.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top