D
Darren
Background:
I have created two forms to view the information in an asset database: One
form (Asset) looks up by asset number (the asset number is also the key field
for the database), the other form (Location) looks up the assets that are
located at a particular office or location. I am trying to link the two
forms using a macro:
the Macro:
At the Location form, there's a button called "view asset", which uses a
macro to take me to the Asset form and show the details on that particular
asset. Here's the macro:
1) OpenForm - opens the Assets form
2) SetValue - sets the value of the lookup combo box in the Assets form to
the asset number wanted:
Item: [Forms]![Assets]![cmbAssetID]
Expression: [Forms]![Location]![Location of Assest subform].[Form]![AssetID]
3) Close - close the Location form
4) Requery
The problem:
When I get to the Asset form using the above macro, I can't edit any data.
I get this message: "This recordset is not updateable." I want to be able to
edit the data when I get there.
Other notes:
1) when I open the Asset form without the macro, I do not get this error.
It seems connected to the macro;
2) I already checked the Data Mode property in the macro, and it is blank
(someone suggested I check the selection in the Data Mode property - when
it's blank, it picks up the settings saved with the form).
Can anyone help?
Thanks in advance
I have created two forms to view the information in an asset database: One
form (Asset) looks up by asset number (the asset number is also the key field
for the database), the other form (Location) looks up the assets that are
located at a particular office or location. I am trying to link the two
forms using a macro:
the Macro:
At the Location form, there's a button called "view asset", which uses a
macro to take me to the Asset form and show the details on that particular
asset. Here's the macro:
1) OpenForm - opens the Assets form
2) SetValue - sets the value of the lookup combo box in the Assets form to
the asset number wanted:
Item: [Forms]![Assets]![cmbAssetID]
Expression: [Forms]![Location]![Location of Assest subform].[Form]![AssetID]
3) Close - close the Location form
4) Requery
The problem:
When I get to the Asset form using the above macro, I can't edit any data.
I get this message: "This recordset is not updateable." I want to be able to
edit the data when I get there.
Other notes:
1) when I open the Asset form without the macro, I do not get this error.
It seems connected to the macro;
2) I already checked the Data Mode property in the macro, and it is blank
(someone suggested I check the selection in the Data Mode property - when
it's blank, it picks up the settings saved with the form).
Can anyone help?
Thanks in advance