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 / August 2004

Tip: Looking for answers? Try searching our database.

Forms help please.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nathan Sanders - 31 Aug 2004 02:27 GMT
Hi,

I have two forms;

FORMA displays a list of suppliers and various generic details for each.

FORMB displays transactional information for suppliers. The supplier is
selected from a combo box list.

I want to be able to call FORMB from FORMA using a command button and
automatically fill the supplier on FORMB depending on the supplier selected
on FORMA without having to retype it.

If this makes sense and you can assist it will be greatly appreciated.

Nathan
PC Datasheet - 31 Aug 2004 03:02 GMT
Put the following code in the Click event of the command button:
DoCmd.OpenForm "FormB"
Forms!FormB!SupplierID = Me!SupplierID

--
                                       PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
                             resource@pcdatasheet.com
                                www.pcdatasheet.com

> Hi,
>
[quoted text clipped - 12 lines]
>
> Nathan
MacDermott - 31 Aug 2004 16:01 GMT
   Ummm....

   If FormB is bound to a table, and its DataEntry property is not set to
Yes, this will change the the SupplierID for the first record to the
SupplierID which is being displayed on FormA.  I doubt this is the behavior
you want.

   If you want to start a new record in FormB every time you click the
button, you can set FormB's DataEntry property to Yes, and use the code
below.

   If you want to look at existing records for this supplier, you'll need a
different approach.

HTH
   - Turtle

> Put the following code in the Click event of the command button:
> DoCmd.OpenForm "FormB"
[quoted text clipped - 23 lines]
> >
> > Nathan
 
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.