Quick question:
What’s the syntax for setting the value of the field [PropertyNo] on frmPropertyChecks, to be the same as the field [PropertyID] on frmProperties?
Long-winded explanation below. Maybe you clever guys can get what you need from the "Exec Summary" above, but in case you need to understand what I'm doing, here goes:
frmMenu has a subform subfrmProperties, which lists addresses in my table (continuous view). You click one to go to...
frmProperty which is a form (single view) filtered to show the one record clicked above (but showing all fields in tblProperties)
frmProperty has a subform subfrmPropertyChecks (continuous view), showing the dates this address was inspected. You click one of these to go to...
frmPropertyChecks (single view) where you can view/edit the full record in tblPropertyChecks.
So far so good, all that works OK.
But sometimes, when the user selects an address to work with, they need to add a NEW inspection record and I'm not sure I'm going about this the right way.
Using the command button wizard, I added a button to subfrmPropertyChecks to open frmPropertyChecks and show all the records. Next I edited the Visual Basic and added
So basically that button just opens a blank form. But I don't want the user to have to enter the PropertyID, because they have already selected the address from the menu. So I want to set the field [PropertyNo] on frmPropertyChecks, to be the same as the field [PropertyID] on frmProperties. But I can’t quite figure out the right syntax. I know very little visual basic I’m afraid.
Very grateful for some pointers. Thank you.
Pat.
What’s the syntax for setting the value of the field [PropertyNo] on frmPropertyChecks, to be the same as the field [PropertyID] on frmProperties?
Long-winded explanation below. Maybe you clever guys can get what you need from the "Exec Summary" above, but in case you need to understand what I'm doing, here goes:
frmMenu has a subform subfrmProperties, which lists addresses in my table (continuous view). You click one to go to...
frmProperty which is a form (single view) filtered to show the one record clicked above (but showing all fields in tblProperties)
frmProperty has a subform subfrmPropertyChecks (continuous view), showing the dates this address was inspected. You click one of these to go to...
frmPropertyChecks (single view) where you can view/edit the full record in tblPropertyChecks.
So far so good, all that works OK.
But sometimes, when the user selects an address to work with, they need to add a NEW inspection record and I'm not sure I'm going about this the right way.
Using the command button wizard, I added a button to subfrmPropertyChecks to open frmPropertyChecks and show all the records. Next I edited the Visual Basic and added
Code:
DoCmd.GoToRecord , , acNewRec
Very grateful for some pointers. Thank you.
Pat.