PC Review


Reply
Thread Tools Rate Thread

List Box Problems

 
 
Brandon Schultz
Guest
Posts: n/a
 
      14th Oct 2003
I have created a list box so that I can navigate through records. The
AfterUpdate event looks like this;
Me.RecordsetClone.FindFirst "[SOD_SalesOrderID] = '" & Me![lstSalesOrders] &
"'"
Me.Bookmark = Me.RecordsetClone.Bookmark

SOD_SalesOrderID is a primary key for the query the list pulls from but
there are duplicate SOD_SalesOrderID records for multiple line numbers
(SOD_SOLineNbr). So, although the list populates with the the records
whenever you select Sales Order line number 2, 3, 4 etc. it does not pull up
the records data in the corresponding text boxes I have on the form. Only
the first line number pulls in ok. I end up having to use the navigation
buttons on the bottom; Which I'd like to eliminate.

Any help would appreciative.

Brandon Schultz


 
Reply With Quote
 
 
 
 
Michel Walsh
Guest
Posts: n/a
 
      17th Oct 2003
Hi,


So, instead of FindFirst, use FindNext:


With Me.RecordSource
Me.Bookmark=.Bookmark
.FindNext strCriteria
If .NoMatch Then
.FindFirst strCriteria
End If
If .NoMatch Then
MsgBox "Sorry, no Match"
Else
Me.Bookmark=.Bookmark
End If
End With



Hoping it may help,
Vanderghast, Access MVP





"Brandon Schultz" <(E-Mail Removed)> wrote in message
news:3f8c5933$(E-Mail Removed)...
> I have created a list box so that I can navigate through records. The
> AfterUpdate event looks like this;
> Me.RecordsetClone.FindFirst "[SOD_SalesOrderID] = '" & Me![lstSalesOrders]

&
> "'"
> Me.Bookmark = Me.RecordsetClone.Bookmark
>
> SOD_SalesOrderID is a primary key for the query the list pulls from but
> there are duplicate SOD_SalesOrderID records for multiple line numbers
> (SOD_SOLineNbr). So, although the list populates with the the records
> whenever you select Sales Order line number 2, 3, 4 etc. it does not pull

up
> the records data in the corresponding text boxes I have on the form. Only
> the first line number pulls in ok. I end up having to use the navigation
> buttons on the bottom; Which I'd like to eliminate.
>
> Any help would appreciative.
>
> Brandon Schultz
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable Combo box based on value in check box and list box.... M G Henry Microsoft Excel Discussion 0 22nd Oct 2008 07:32 PM
How do you get the list box or group box to be a drop down box? =?Utf-8?B?Z2tpdmV0dA==?= Microsoft Access Forms 4 13th Jan 2006 09:53 PM
Error Message: Windows cannot find 'box,box,box,box,box' =?Utf-8?B?Ym91Y2hhcmRwaWU=?= Windows XP Help 2 25th Jul 2005 08:47 PM
Convert List box from excel file to VBA list box object baha Microsoft Excel Programming 0 22nd Nov 2003 06:06 PM
Multi-Selected Items from one List Box to other empty List Box and text box Sumit Microsoft Access Form Coding 3 15th Jul 2003 09:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:32 AM.