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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update a form to the relevant record

Status
Not open for further replies.

scrano

Technical User
Jan 24, 2001
51
0
0
AU
I have a table in a database that contains a field called ID. What I want to do is to run select query on that table, this query can return more than one record. So what I want to be able to do is if the query returns more than one record I want to the form that displays the records to display lowest value alphabetically in the surname field. I tried to use dlookup but the criteria has to be a string. Anyone have any thoughts on this. Any help would be greatly appreciated. Thanks
 
If you make a form for you query. That is Continuous and has vertical scroll bar only. use can specify order by as well. with mine I did not specify oreder and it sort on ID which is the key.
 
How are ya scrano . . . .

Make a query that returns the records you want and set the sort field for SurName to ascending.

In the [blue]RecordSource[/blue] property for the form, select the query.

Let us know if ya have any trouble!

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

Part and Inventory Search

Sponsor

Back
Top