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

Tip: Looking for answers? Try searching our database.

Populate second form from combo box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eon - 19 May 2004 18:48 GMT
Main form is based on Units Table.
UnitID PK
UnitNumber
SquareFeet
Rent
The combobox on UnitsForm shows the UnitNumber and populates the
SquareFeet and Rent txtboxes when a unit is selected.

Second Form is based on Leases Table.
LeaseID PK
UnitID FK
LeaseStart
LeaseEnd

Units is one of One to many.

I want to use a command button to open LeaseForm and show the
UnitNumber and Rent selected in Units Form. If no current Lease is
associated with the Unit, then open to new record.

Does anyone have a suggestion?

Thanks
Shiner452 - 20 May 2004 14:55 GMT
In the OnLoad or OnOpen event of the form you want to display the ne
record if no lease is present enter this code...I am going to assum
that if there is no lease the words 'No Lease' will be displayed in
the textbox I am going to call txtLease because I dont know what yo
are calling it.

If txtLease.Value = "No Lease" Then
DoCmd.GoToRecord , , acNewRecord
EndI

-----------------------------------------------
~~
~~
 
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.