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

Access Forms 4

Status
Not open for further replies.

troybilt1

Technical User
Mar 4, 2008
2
US
I'm using Access and I have created a search form that displays results in continous feed format. What I want to do is create a button to open the actual record in the database through a more detailed form. Do I do this though a query with a join to the new form?
 
Hi Troybilt1,

There are several ways of doing this. Use a query, set the filter property, you could even look at the FAQ on this site.
faq702-2039
faq702-1177




Ian Mayor (UK)
Program Error
Always make your words sweet and nice. Because you never know when you may have to eat them.
 
One way I've done this is to set the double click (or single click, if you prefer) property of a control that displays, let's say, the identifier (primary key value) of the record in your form that lists the records. Execute code that will open a form that uses a query that selects the one record that matches the value of the control on your current form (be sure you don't close the list form). Or before you open the detail form, set a public variable to the primary key value, then open the "pop up" type form with the on open property using code to set filteron to true and the filter so it uses the value of the public variable.

This sounds a lot more complicated that it is. But it works very nicely and it reasonably intuitive for users to use.

Bob
 
How are ya troybilt1 . . .

Same as [blue]BSman[/blue], only I'd use the forms [blue]Double Click[/blue] event. This way you simply [blue]Double Click[/blue] the forms [blue]Record Selector[/blue] . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
A lot of my apps use continuous forms as 'lists', as a starting point. Since it's intuitive for a user to double-click anywhere in the one 'row' (which usually comprises several fields) to open a popup for the detail view, I use a command button, with its Transparent property set to True, over the top of the whole row.

The DoubleClick event of the button would be something like:
Code:
DoCmd.OpenForm "myDetailPopup", , , "myID=" & myID



Max Hugen
Australia
 
I was looking for a good and efficient way to create a search screen and used the strWhere = strWhere & "([Mun] = " & Me.cboFilterMun & ") AND " and append the next search to the box to this code. I seems to work really well, but I want to know if there is a better way


Thanks for all of your help so far
troybilt1
 
In case you're interested, I've attached a screen shot of the type of searchable list I use these days. Features:

1. Pre-filterable - in this case, different users tend to work on Contracts within an assigned 'Service Area', so the user can pre-filter the Service Area, which then returns a smaller number of records. This setting is remembered for each user, and the form opens to their last setting.

2. Sortable - by any column - 1st click A-Z, 2nd click Z-A.

3. Seachable - by any combination of columns. Includes 'smart' search options. eg, for dates, as the tooltip advises users: "Enter Date to filter on. Optional: prefix with '>' (greater than) or '<' (less than), use 'To' to specify a range, or enter 'Null' for no date."


Note that the 'list' is a subform. The subform's recordset is first filtered using the 'pre-filter'. The subsequent sorting and filtering use the form's Filter and OrderBy properties.

Double-clicking any record then opens a 'detail' form for that record.


Max Hugen
Australia
 
 http://www.hugen.com.au/examples/Searchable_List_Example.jpg
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top