If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Populate second form from combo box
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 |
#2
|
|||
|
|||
Populate second form from combo box
In the OnLoad or OnOpen event of the form you want to display the new record if no lease is present enter this code...I am going to assume that if there is no lease the words 'No Lease' will be displayed in a the textbox I am going to call txtLease because I dont know what you are calling it. If txtLease.Value = "No Lease" Then DoCmd.GoToRecord , , acNewRecord EndIf ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Thread Tools | |
Display Modes | |
|
|