using list box to open a record (1 Viewer)

soundsfishy

Registered User.
Local time
Today, 20:57
Joined
Sep 25, 2002
Messages
174
im trying to open a record from a selection in a list box but seem to have a little difficulty making it work.

I want the user to click on search and type a name to find a name that they want and then double click to open that record.

Can someone tell what Im doing wrong.
 

Attachments

  • modified_test4_a97.zip
    84.4 KB · Views: 103
Last edited:

ansentry

Access amateur
Local time
Today, 20:57
Joined
Jun 1, 2003
Messages
995
Soundsfishy,

Have a look at the attached db sample (NOT MINE)

On the menu select the last option "Using a second form" I think that this is what you want to do.



Regards,
 

soundsfishy

Registered User.
Local time
Today, 20:57
Joined
Sep 25, 2002
Messages
174
Ok I tried using this and it does what I want it do but Im getting the following message after the record is selected

The Open Form action was cancelled.

I cant seem close the search form.



Private Sub lstResults_DblClick(Cancel As Integer)
On Error GoTo Err_lstResults_DblClick

Dim strFormName As String

strFormName = "frmProposerMain"

DoCmd.Openform strFormName, , , "[ProposerID]=" & "'" & Me!lstResults & "'"

DoCmd.CLOSE acForm, Me.NAME

Exit_lstResults_DblClick:
Exit Sub

Err_lstResults_DblClick:
MsgBox err.Description
Resume Exit_lstResults_DblClick


End Sub
 
Last edited:

ansentry

Access amateur
Local time
Today, 20:57
Joined
Jun 1, 2003
Messages
995
Looks like I forgot the attachment,



Regards,
 
Last edited:

Users who are viewing this thread

Top Bottom