Createing linked forms: "Object is closed or doesn't exist"

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

Guest

I am trying to create linked forms however Access will do nothing but give
the error "The Expression you entered refers to an object that is closed or
doesn't Exist." I know the object exists because it is in list in the
Database Objects panel. Two questions:

1. How do you make queries and such available for use in forms?

2. How do you make objects available for macros and such?

Someone here where I work eluded to something similar to an oracle procedure
compile you have to perform on all new objects to create the VB back ends
that forms and macros lock into but I have yet to find this. In case by now
its not apparent, I am mainly an Oracle programmer and now working in Access
by necessity so I am extreamly unfamiliar with how the programmatic and
permissions portions of it works.
 
David said:
I am trying to create linked forms however Access will do nothing but give
the error "The Expression you entered refers to an object that is closed or
doesn't Exist." I know the object exists because it is in list in the
Database Objects panel. Two questions:

1. How do you make queries and such available for use in forms?

2. How do you make objects available for macros and such?

Someone here where I work eluded to something similar to an oracle procedure
compile you have to perform on all new objects to create the VB back ends
that forms and macros lock into but I have yet to find this. In case by now
its not apparent, I am mainly an Oracle programmer and now working in Access
by necessity so I am extreamly unfamiliar with how the programmatic and
permissions portions of it works.


How you do that kind of thing depends on the objects you are
working with and the specific effect you are trying to
achieve.

Tables and queries (queries can be used just like tables)
are usually used as the Record Source of bound forms and
reports. Combo and List Box controls also use a table/query
to specify the list of data in the list. Though it is not
needed all that often, you can use a VBA procedure to open a
recordset to analyze multiple records or calculate an
aggregate value.

Objects such as forms and reports must be opened. They are
always available to the OpenForm/OpenReport methods. Once a
form is opened, it's properties/methods are available.

Note, if you have *any* programming experience, use VBA, not
macros.
 
Ok. I have followed this advice here and went with VBA as I am familure with
C# as well as Oracle's PL/SQL but How do you access bind variables from VBA?
 
It's starting to sound like you have some misperceptions
about "the Access way" because te normal approach is to bind
a form to a table/query through the form's RecordSource
property. Each text box (or any data type control) can be
bound to a field in the record source through its
ControlSource property. Once those are specified in the
form's design view, most everything else is automatic.

I think you should explain what you are trying to accomplish
and how your tables are related to the goal.
 
What do you mean by "linked forms"? There really is no such concept in
Access by that name.
The error you are getting really means the object is closed.

Your question regarding forms and queries:
Forms can be either bound or unbound. An unbound form has no record source.
A record source is either a table or a query. Record Source is one of a
form's properties.

You don't need to do anything to make objects availabe for macros. You
reference them in the macro.

Please post back if I can answer any other questions.
 
Back
Top