Hi,
Can anyone help with the following questions I have on Access 2000. I am still fairly new to all this so hope these questions are not too basic.
1) I am creating a form where certain fields need to be available for entry or protected based on data entered in other fields. I also want to be able to protect all fields, if a status field is set to "CT" and that change has been saved.
2) I have created a form to amend a record (single record at a time) and on this form is a subform which enables the addition of multiple child records on a seperate table. This all works very well but I have come across a problem on the main form. I have added a close form button and added a piece of functionality to check for changes to the main form. If changes exist, it issues a message asking if changes are to be saved before closing. I used the me.dirty command to achieve this. This works ok if the cursor is placed in one of the fields on the main form. If the cursor is placed in a field on the displayed subform, clicking on the close button just saves all changes on both forms and closes the screen. Is there anyway to force the close button to check for changes on a particular form? I have tried forms![formname].dirty but this does not seem to work. If this is not possible, is there a way to force the cursor back to tab position 1, before checking for changes. I have tried requery, but this commits the record changes.
3) I have set up some fields which have a list of values behind them but are also manually enterable. Is there a way of validating the entered data against the LOV as the user leaves the field? Additionally is there a way of preventing the user from manually entering data, forcing them to select from the LOV?
Thanks for any help you can provide.
Kind Regards
Simon Johns
Can anyone help with the following questions I have on Access 2000. I am still fairly new to all this so hope these questions are not too basic.
1) I am creating a form where certain fields need to be available for entry or protected based on data entered in other fields. I also want to be able to protect all fields, if a status field is set to "CT" and that change has been saved.
2) I have created a form to amend a record (single record at a time) and on this form is a subform which enables the addition of multiple child records on a seperate table. This all works very well but I have come across a problem on the main form. I have added a close form button and added a piece of functionality to check for changes to the main form. If changes exist, it issues a message asking if changes are to be saved before closing. I used the me.dirty command to achieve this. This works ok if the cursor is placed in one of the fields on the main form. If the cursor is placed in a field on the displayed subform, clicking on the close button just saves all changes on both forms and closes the screen. Is there anyway to force the close button to check for changes on a particular form? I have tried forms![formname].dirty but this does not seem to work. If this is not possible, is there a way to force the cursor back to tab position 1, before checking for changes. I have tried requery, but this commits the record changes.
3) I have set up some fields which have a list of values behind them but are also manually enterable. Is there a way of validating the entered data against the LOV as the user leaves the field? Additionally is there a way of preventing the user from manually entering data, forcing them to select from the LOV?
Thanks for any help you can provide.
Kind Regards
Simon Johns