Hi,
I have made a database about 4 years ago, since then it's used with success, and I've made some changes from time to time to improve it continuously. Now I would like to implement a solution to improve the data input process.
What it's all about...
I have a form called frmCustomers, which is the main form, and another form called frmMonthlyServices, which is placed as a subform on frmCustomers. The link field between this two is CustomerID.
The provided services are monthly services, so data is entered once/each month for all customers. To take the new value (value=quantity of service) of a month as old value for the next month, on frmMonthlyServices on the On click event of Add new record button is placed the following code:
Const cQuote = """"
Me!Old_value.DefaultValue = cQuote & Me!New_value.Value & cQuote
DoCmd.GoToRecord , , acNewRec
Me.New_value.SetFocus
As the things are working currently, after entering the new value, the user has to go down to the navigation buttons of form frmCustomers to go to the next record (next customer), after that has to click on Add new record button of the subform (frmMonthlyServices), and so on. This way, when hundreds of customer has to be handled, things doesn't look very good, the data input process goes with loss of precious time.
That's why I would like to change the code above, to allow going to next customer when the Add new record button is clicked on the subform.
Basicly my question is: how can I go to the next record on my main form, when a button is clicked on the subform?
Any help is more then wellcome.
Thanks, Attila
I have made a database about 4 years ago, since then it's used with success, and I've made some changes from time to time to improve it continuously. Now I would like to implement a solution to improve the data input process.
What it's all about...
I have a form called frmCustomers, which is the main form, and another form called frmMonthlyServices, which is placed as a subform on frmCustomers. The link field between this two is CustomerID.
The provided services are monthly services, so data is entered once/each month for all customers. To take the new value (value=quantity of service) of a month as old value for the next month, on frmMonthlyServices on the On click event of Add new record button is placed the following code:
Const cQuote = """"
Me!Old_value.DefaultValue = cQuote & Me!New_value.Value & cQuote
DoCmd.GoToRecord , , acNewRec
Me.New_value.SetFocus
As the things are working currently, after entering the new value, the user has to go down to the navigation buttons of form frmCustomers to go to the next record (next customer), after that has to click on Add new record button of the subform (frmMonthlyServices), and so on. This way, when hundreds of customer has to be handled, things doesn't look very good, the data input process goes with loss of precious time.
That's why I would like to change the code above, to allow going to next customer when the Add new record button is clicked on the subform.
Basicly my question is: how can I go to the next record on my main form, when a button is clicked on the subform?
Any help is more then wellcome.
Thanks, Attila