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 / Forms / March 2008

Tip: Looking for answers? Try searching our database.

access form in data sheet format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mark_matchett - 15 Mar 2008 22:00 GMT
I am trying to view the results of a query in a form.
I have a "sales order table" that has order lines, each line has product
detail and a "CustomerID" which comes from a table called "Contacts"

I have queried the relevant data from the sales order table and created a
form in datasheet format.

I want to be able to select the customers ID from a combo box and for the
datasheet view form to then update showing only the order lines applicable to
that customer. The Combo box is currently set to select data from the
contacts table, the data comes from the Sales order table. ( 1 to many)

So far I have taken the CustomerID field from the form and written the
following code to try and make it work, but it dosnt update the data in the
form.

Private Sub combo_coname_AfterUpdate()
' Find the record that matches the control.
   Dim rs As Object

   Set rs = Me.Recordset.Clone
   rs.FindFirst "[CompanyName] = '" & Me![combo coname] & "'"
   If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Whats is the best way to achieve this ?
Maurice - 15 Mar 2008 22:08 GMT
Mark,

The combo has to be unbound. So it does need a rowsource but it shouldn't
have a controlsource. See if that does the trick.

hth
Signature

Maurice Ausum

> I am trying to view the results of a query in a form.
> I have a "sales order table" that has order lines, each line has product
[quoted text clipped - 22 lines]
>
> Whats is the best way to achieve this ?
 
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.