Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / March 2005

Tip: Looking for answers? Try searching our database.

Desparately need help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jsb - 24 Mar 2005 20:18 GMT
Hello
I have a combo box(unbound) for the Customer field.
When I select a customer from that, the text box diplays
corresponding AcctNo. My problem is, if a Customer has
more than one account, the AcctNo in the text box doesn't
change.
What I should be doing?

This is the code I wrote:

Private Sub Combo1_AfterUpdate()
   ' Find the record that matches the control.  
   Dim Rs As Object

   Set Rs = Me.Recordset.Clone
   Rs.FindFirst "[CUSTOMER] = '" & Replace(Me!
[Combo1], "'", "''") & "'"
   Me.Bookmark = Rs.Bookmark
 
End Sub
Duane Hookom - 24 Mar 2005 21:01 GMT
The bound column of the combo box must be unique. What is the Row Source of
your combo box?

Signature

Duane Hookom
MS Access MVP

> Hello
> I have a combo box(unbound) for the Customer field.
[quoted text clipped - 16 lines]
>
> End Sub
JSB - 24 Mar 2005 21:10 GMT
It is

SELECT [Find by Company Name].[CUSTOMER] FROM [Find by
Company Name];

'Find ByCompany Name' is the Query name

Thanks.
 
>-----Original Message-----
>The bound column of the combo box must be unique. What is the Row Source of
[quoted text clipped - 22 lines]
>
>.
Duane Hookom - 25 Mar 2005 03:34 GMT
Apparently you need to include the AcctNo in the Row Source if you expect to
find a particular AcctNo.

Signature

Duane Hookom
MS Access MVP

> It is
>
[quoted text clipped - 35 lines]
>>
>>.
BruceM - 25 Mar 2005 15:33 GMT
I would think that if each customer can have multiple account numbers you
would need an Accounts table, with CustomerID (primary key from the customer
table) as its foreign key.  If the main form is based on the Customer table a
continuous subform based on the Accounts table would probably do what you
need.

> It is
>
[quoted text clipped - 35 lines]
> >
> >.
MacDermott - 25 Mar 2005 13:17 GMT
Look at your code.
Doesn't it say "FindFirst"?
So that's what it does; finds the first match.

So, what is your design?
How do you want to signal to the program that it is to find something
besides the first match?

> Hello
> I have a combo box(unbound) for the Customer field.
[quoted text clipped - 16 lines]
>
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.