default is chosen or highlighted in the list box

F

Frank Situmorang

Hello,

In my form to filter the report, I have a list box which row source is from
the tblchurches ( church table).

What I need to plan, before I send the chruch memership database to the
church, I want to make it's default and instead of go down the list, it will
automatically highlight the church name in the list box.

Can anyone help me how can I make it that way?

Thanks for any help.

Frank
 
N

NEWER USER

In the On Open event property of the form, select Event Procedure, then

SetSelections Me.lstBox Name,0,"church"
 
F

Frank Situmorang

Dear Newer:

There is a compiler error message that says " Function is not defined"

This is my VBA, in addition to my existing open procedures.
Private Sub Form_Open(Cancel As Integer)
SetSelections Me.Org_Bodies, 0, "GMAHK Jemaat Kebayoran"
On Error GoTo Err_Form_Open

Call FillFormLabels(Me.Name)

Exit_Form_Open:
Exit Sub

Err_Form_Open:
Select Case Err.Number
Case 2450 'do nothing
Case Else
Call ShowError(Err.Number, Err.Description,
"Form_frmReportFilter4." _
& "Form_Open")
Resume Exit_Form_Open
End Select
End Sub

Thanks for your help again.

Frank
 
M

Michael Gramelspacher

Hello,

In my form to filter the report, I have a list box which row source is from
the tblchurches ( church table).

What I need to plan, before I send the chruch memership database to the
church, I want to make it's default and instead of go down the list, it will
automatically highlight the church name in the list box.

Can anyone help me how can I make it that way?

Thanks for any help.

Frank

Stephan Lebans provided me code to do this in Jan 2000. Here is a message
where he provided the same information to another person.

http://www.eggheadcafe.com/conversation.aspx?messageid=29727575&threadid=29727574
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top