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!

Setting up a form with a records "view" on it

Status
Not open for further replies.

dabowles

MIS
Jun 26, 2001
64
0
0
US
Hi,
I am trying to set up a form, and not even sure if you can do this with Access, though. Let me explain what I am trying to do. I am creating a technical support case management form. I am wanting to create a main form, which on that main form it has a view that I can display either all of the closed cases or all of the open cases, by the click of a radio button above the view. I want the view to look like a text box, just expanded out by about 5 inches in length and 4 inches in height. I then want to be able to scroll through the records. Now on this view, I only want to put the important fields of each record. For example, Owner of the Record, Date, Case#, Problem Description, and Case Status(Open/Closed). After I scroll through the list and decide to open one of the records, I want to be able to double click the record and it will automatically launch another form that will contain the entire record contents for editing purposes. Does anyone have any idea on where I may start on developing a form such as this? Anyone know of any FAQs out there or documentation that might lead me in the right direction to start something like this?

Thanks,
David Bowles
 
David I would use a list box instead of a text box to list
the records and a Combo box based on a two record table (open or close)
and in the On after update event of the combobox...requery the listbox(something like " Me!Listname.Requery")...In the listbox have it base on a query base on your table of records with [Forms]![frmName]![ComboboxName].[value] placed in the criteria row of the "case status" field.
in the after update event of the listbox place something like ;( ' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[RecordNumber] = '" & Me![ListName] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark)
where record number is the name of your primary key field for the table
(ps select all the field you want displayed in the query)

I'm sure someone can explain it better.. but its what I have
done and works fine for me.
as for the double click event: try the following code
that someone in tek-tips was kind enough to help me with

Dim strcrit As String
Dim strfrmname As String

Dim strWhere As String
strcrit = [ListName].[Column](0)
strWhere = "recordnumber ='" & strcrit & "'"



strfrmname = "frmName1"

DoCmd.OpenForm strfrmname, acNormal, , strWhere

ListName_DblClick_Exit:
Exit Sub

ListName_DblClick_err:
MsgBox Err.Number
MsgBox Err.Description

Column 0 is the RecordNumber (hopefully) should be your primarykeyed field that you chose when you create the query for the listbox.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top