I had no response to my original post I assume it was hastily written and perhaps a bit vague. So I have elaborated on the details and hope for better luck.
I have two forms. Form A is opened as a new record with DoCmd.GoToRecord , , acNewRec
A combo box allows selection of a job number to enter new actions against. There is also a cmd button which opens a linked Form (Form B) to show previous records as read only.
I want to be able to select a record from Form B and open it on Form A for editing.
So far I have a "Get Record" button on Form B which copies the ID of the selected record to a textbox on Form A and closes Form B. Then I am trying to use DoCmd.FindRecord using the record ID to load it onto Form A.
But since I initially opened Form A as a new record I am getting an error message "You cancelled the previous operation"
I have tried to get around this problem by using DoCmd.ShowAllRecords when Form A receives the focus after Form B closes...but to no avail
I could solve the problem by initially opening Form A in edit mode but I want to avoid that because it increases the prospect of entering actions against the wrong job number because the combo box will then show the last job against which a record was entered.
Can anyone suggest how I can do this
Many thanks
Mike
I have two forms. Form A is opened as a new record with DoCmd.GoToRecord , , acNewRec
A combo box allows selection of a job number to enter new actions against. There is also a cmd button which opens a linked Form (Form B) to show previous records as read only.
I want to be able to select a record from Form B and open it on Form A for editing.
So far I have a "Get Record" button on Form B which copies the ID of the selected record to a textbox on Form A and closes Form B. Then I am trying to use DoCmd.FindRecord using the record ID to load it onto Form A.
But since I initially opened Form A as a new record I am getting an error message "You cancelled the previous operation"
I have tried to get around this problem by using DoCmd.ShowAllRecords when Form A receives the focus after Form B closes...but to no avail
I could solve the problem by initially opening Form A in edit mode but I want to avoid that because it increases the prospect of entering actions against the wrong job number because the combo box will then show the last job against which a record was entered.
Can anyone suggest how I can do this
Many thanks
Mike