Trying to retreive a record from a linked form - Edited Post

MikeZ

Board Regular
Joined
May 16, 2003
Messages
86
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
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,221,826
Messages
6,162,192
Members
451,752
Latest member
majbizzaki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top