G
GracieLou
I have read numerous postings and have tried nearly as many with no results.
I have a form being opened from my frmMain. The record source is the same,
but, depending on the button clicked the form needs to sort differently. The
fields to be sorted are either VndrNbr [asc], VndrNm [asc], or Amt [desc].
When a button on frmMain is click SortSw is set to a value, 0=VndrNbr,
1=VndrNm, and 2=Amt, and the frmVndrLst is opened.
In the OnOpen for frmVndrLst I have
If SortSw = 0 then
Me.OrderBy = VndrNbr
Elseif SortSw = 1 then
Me.oderby = VndrNm
Elseif SortSw = 2 then
Me.OrderBy = Amt [desc]
End If.
Me.OderByOn = True
When I click on VndrNbr I get a parameter box asking for the VndrNbr. It
has the tables first VndrNbr showing above the box's imput area. I just
click OK and the form opens but is not sorted. Weh I click on the Name
button i get a parameter box with the form that is opening, frmVndrLst, above
the box's input area.
I am throughly confused. Can someone please help.
Thank You.
I have a form being opened from my frmMain. The record source is the same,
but, depending on the button clicked the form needs to sort differently. The
fields to be sorted are either VndrNbr [asc], VndrNm [asc], or Amt [desc].
When a button on frmMain is click SortSw is set to a value, 0=VndrNbr,
1=VndrNm, and 2=Amt, and the frmVndrLst is opened.
In the OnOpen for frmVndrLst I have
If SortSw = 0 then
Me.OrderBy = VndrNbr
Elseif SortSw = 1 then
Me.oderby = VndrNm
Elseif SortSw = 2 then
Me.OrderBy = Amt [desc]
End If.
Me.OderByOn = True
When I click on VndrNbr I get a parameter box asking for the VndrNbr. It
has the tables first VndrNbr showing above the box's imput area. I just
click OK and the form opens but is not sorted. Weh I click on the Name
button i get a parameter box with the form that is opening, frmVndrLst, above
the box's input area.
I am throughly confused. Can someone please help.
Thank You.