Add new record in form view.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I've got into a bit of a mess, where I have a form and all I want to the user to do is add new reords to the end of the recordset (query of 1 table with all fields). Thus I added the pre-defined mcr 'GoToRecord'.New to the forms on activate event. (I've tried 'on load', 'on open' ect). The form is linked through the record source ('QryAddTolHistStatic'). The Mcr has been given a .ObectName ('QryAddTolHistStatic').

When the form is opended, The following error popup message is generated
The object 'QryAddTolHistStatic' isn't open
The macro you are running (directly or indirectly) conatins a GoToRecord, but the Object Name arguement names an object that is closed
The objectname arguement for the GoToRecord method names an object that is closed

I don't undersatnd why it says the query is not open, as without the mcr the form opens OK with the query running. I think it maybe to do with it wanting to open the query in a Datasheet view.

Could anyone advise what my solution is? shurely this Mcr should run in form view

Thanks in advance.. Stephen.
 
To enforce that a user ONLY add records, via the form, set the DataEntry
property to True.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Stephen said:
Hi all,

I've got into a bit of a mess, where I have a form and all I want to the
user to do is add new reords to the end of the recordset (query of 1 table
with all fields). Thus I added the pre-defined mcr 'GoToRecord'.New to the
forms on activate event. (I've tried 'on load', 'on open' ect). The form
is linked through the record source ('QryAddTolHistStatic'). The Mcr has
been given a .ObectName ('QryAddTolHistStatic').
When the form is opended, The following error popup message is generated;
The object 'QryAddTolHistStatic' isn't open.
The macro you are running (directly or indirectly) conatins a GoToRecord,
but the Object Name arguement names an object that is closed.
The objectname arguement for the GoToRecord method names an object that is closed.

I don't undersatnd why it says the query is not open, as without the mcr
the form opens OK with the query running. I think it maybe to do with it
wanting to open the query in a Datasheet view.
 
Back
Top