automation object - novice

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

Guest

I am getting the error message as follows

the Object doesnt contain the automation object 'rooms'.....

what does this mean. I am trying to create an IIF statement, nothing fancy,
but am getting this. Could someone explain

thanks

Lynn
 
It means that some part of your code or the setting for an event property is
telling ACCESS to go look for a table or query or control or some other
object named "rooms".

Can you give us more details?
 
I am trying to calculate the number of places available on a course.
The calculation which throws up the error is as follows

=IIf(IsNull([rooms]![room capacity]),[rooms]![max
participants]-[text1010],IIf([rooms]![room capacity]<[rooms]![max
participants],([rooms]![room capacity]-[text1010]),([rooms]![max
participants]-[Text1010])))

if the field 'room capacity' has no data in it, then use the max
participants field minus the text1010 (which is places already booked) to
give the number of places still available. none of these controls except
text1010 are displayed on this sub form which is why I have tried to refer to
the table eg table=rooms, field=room capacity.

hope this makes sense!
 
What is rooms -- a query? a table? Are the room capacity and other "fields"
the names of fields in your form's recordsource? or the name of controls on
the form?

If rooms is the name of a table or query, you don't use ! operator between
it and its field, you would use the . operator. However, a table or a query
are not avaiable for "direct" reading in this manner; the query or table
must be accessed by a recordset, by a domain function (DLookup, DCount,
DSum, etc.), by binding a form to an SQL statement that is based on the
table or query and then reference the fields from the form's recordsource,
etc.

Assuming that room capacity, etc. are controls or fields in the form:

=IIf(IsNull([room capacity]),[max participants]-[text1010],IIf([room
capacity]<[max participants],([room capacity]-[text1010]),([max
participants]-[Text1010])))


--

Ken Snell
<MS ACCESS MVP>

lynn atkinson said:
I am trying to calculate the number of places available on a course.
The calculation which throws up the error is as follows

=IIf(IsNull([rooms]![room capacity]),[rooms]![max
participants]-[text1010],IIf([rooms]![room capacity]<[rooms]![max
participants],([rooms]![room capacity]-[text1010]),([rooms]![max
participants]-[Text1010])))

if the field 'room capacity' has no data in it, then use the max
participants field minus the text1010 (which is places already booked) to
give the number of places still available. none of these controls except
text1010 are displayed on this sub form which is why I have tried to refer
to
the table eg table=rooms, field=room capacity.

hope this makes sense!


Ken Snell said:
It means that some part of your code or the setting for an event property
is
telling ACCESS to go look for a table or query or control or some other
object named "rooms".

Can you give us more details?
 
thanks for your reply.

Rooms is a table; room capacity and max participants are fields in the rooms
table. text 1010 is a calculated control on the form. room capacity or max
participants do not appear as controls on this particular form, but they do
appear on another form, where the same calculation works ok., I assume
because it is referring to controls that exist on that form.

Not sure how I go about accessing the fields that are not in the current form.

Is there any good reading you can recommend on this sort of thing?



Ken Snell said:
What is rooms -- a query? a table? Are the room capacity and other "fields"
the names of fields in your form's recordsource? or the name of controls on
the form?

If rooms is the name of a table or query, you don't use ! operator between
it and its field, you would use the . operator. However, a table or a query
are not avaiable for "direct" reading in this manner; the query or table
must be accessed by a recordset, by a domain function (DLookup, DCount,
DSum, etc.), by binding a form to an SQL statement that is based on the
table or query and then reference the fields from the form's recordsource,
etc.

Assuming that room capacity, etc. are controls or fields in the form:

=IIf(IsNull([room capacity]),[max participants]-[text1010],IIf([room
capacity]<[max participants],([room capacity]-[text1010]),([max
participants]-[Text1010])))


--

Ken Snell
<MS ACCESS MVP>

lynn atkinson said:
I am trying to calculate the number of places available on a course.
The calculation which throws up the error is as follows

=IIf(IsNull([rooms]![room capacity]),[rooms]![max
participants]-[text1010],IIf([rooms]![room capacity]<[rooms]![max
participants],([rooms]![room capacity]-[text1010]),([rooms]![max
participants]-[Text1010])))

if the field 'room capacity' has no data in it, then use the max
participants field minus the text1010 (which is places already booked) to
give the number of places still available. none of these controls except
text1010 are displayed on this sub form which is why I have tried to refer
to
the table eg table=rooms, field=room capacity.

hope this makes sense!


Ken Snell said:
It means that some part of your code or the setting for an event property
is
telling ACCESS to go look for a table or query or control or some other
object named "rooms".

Can you give us more details?
--

Ken Snell
<MS ACCESS MVP>


I am getting the error message as follows

the Object doesnt contain the automation object 'rooms'.....

what does this mean. I am trying to create an IIF statement, nothing
fancy,
but am getting this. Could someone explain

thanks

Lynn
 
Assuming that you want to find the values for the fields (in rooms table)
from the table itself, you can use the DLookup function to get the value
from a field in a table or query. Take a look at Help info on it, and then
post back if you need additional assistance; we'll be here!

--

Ken Snell
<MS ACCESS MVP>

lynn atkinson said:
thanks for your reply.

Rooms is a table; room capacity and max participants are fields in the
rooms
table. text 1010 is a calculated control on the form. room capacity or max
participants do not appear as controls on this particular form, but they
do
appear on another form, where the same calculation works ok., I assume
because it is referring to controls that exist on that form.

Not sure how I go about accessing the fields that are not in the current
form.

Is there any good reading you can recommend on this sort of thing?



Ken Snell said:
What is rooms -- a query? a table? Are the room capacity and other
"fields"
the names of fields in your form's recordsource? or the name of controls
on
the form?

If rooms is the name of a table or query, you don't use ! operator
between
it and its field, you would use the . operator. However, a table or a
query
are not avaiable for "direct" reading in this manner; the query or table
must be accessed by a recordset, by a domain function (DLookup, DCount,
DSum, etc.), by binding a form to an SQL statement that is based on the
table or query and then reference the fields from the form's
recordsource,
etc.

Assuming that room capacity, etc. are controls or fields in the form:

=IIf(IsNull([room capacity]),[max participants]-[text1010],IIf([room
capacity]<[max participants],([room capacity]-[text1010]),([max
participants]-[Text1010])))


--

Ken Snell
<MS ACCESS MVP>

lynn atkinson said:
I am trying to calculate the number of places available on a course.
The calculation which throws up the error is as follows

=IIf(IsNull([rooms]![room capacity]),[rooms]![max
participants]-[text1010],IIf([rooms]![room capacity]<[rooms]![max
participants],([rooms]![room capacity]-[text1010]),([rooms]![max
participants]-[Text1010])))

if the field 'room capacity' has no data in it, then use the max
participants field minus the text1010 (which is places already booked)
to
give the number of places still available. none of these controls
except
text1010 are displayed on this sub form which is why I have tried to
refer
to
the table eg table=rooms, field=room capacity.

hope this makes sense!


:

It means that some part of your code or the setting for an event
property
is
telling ACCESS to go look for a table or query or control or some
other
object named "rooms".

Can you give us more details?
--

Ken Snell
<MS ACCESS MVP>


message
I am getting the error message as follows

the Object doesnt contain the automation object 'rooms'.....

what does this mean. I am trying to create an IIF statement, nothing
fancy,
but am getting this. Could someone explain

thanks

Lynn
 
I would give that a go, but no matter what I enter in the help, I cannot find
an explaination of the DLookup function. Any ideas how I find this?

Ken Snell said:
Assuming that you want to find the values for the fields (in rooms table)
from the table itself, you can use the DLookup function to get the value
from a field in a table or query. Take a look at Help info on it, and then
post back if you need additional assistance; we'll be here!

--

Ken Snell
<MS ACCESS MVP>

lynn atkinson said:
thanks for your reply.

Rooms is a table; room capacity and max participants are fields in the
rooms
table. text 1010 is a calculated control on the form. room capacity or max
participants do not appear as controls on this particular form, but they
do
appear on another form, where the same calculation works ok., I assume
because it is referring to controls that exist on that form.

Not sure how I go about accessing the fields that are not in the current
form.

Is there any good reading you can recommend on this sort of thing?



Ken Snell said:
What is rooms -- a query? a table? Are the room capacity and other
"fields"
the names of fields in your form's recordsource? or the name of controls
on
the form?

If rooms is the name of a table or query, you don't use ! operator
between
it and its field, you would use the . operator. However, a table or a
query
are not avaiable for "direct" reading in this manner; the query or table
must be accessed by a recordset, by a domain function (DLookup, DCount,
DSum, etc.), by binding a form to an SQL statement that is based on the
table or query and then reference the fields from the form's
recordsource,
etc.

Assuming that room capacity, etc. are controls or fields in the form:

=IIf(IsNull([room capacity]),[max participants]-[text1010],IIf([room
capacity]<[max participants],([room capacity]-[text1010]),([max
participants]-[Text1010])))


--

Ken Snell
<MS ACCESS MVP>

I am trying to calculate the number of places available on a course.
The calculation which throws up the error is as follows

=IIf(IsNull([rooms]![room capacity]),[rooms]![max
participants]-[text1010],IIf([rooms]![room capacity]<[rooms]![max
participants],([rooms]![room capacity]-[text1010]),([rooms]![max
participants]-[Text1010])))

if the field 'room capacity' has no data in it, then use the max
participants field minus the text1010 (which is places already booked)
to
give the number of places still available. none of these controls
except
text1010 are displayed on this sub form which is why I have tried to
refer
to
the table eg table=rooms, field=room capacity.

hope this makes sense!


:

It means that some part of your code or the setting for an event
property
is
telling ACCESS to go look for a table or query or control or some
other
object named "rooms".

Can you give us more details?
--

Ken Snell
<MS ACCESS MVP>


message
I am getting the error message as follows

the Object doesnt contain the automation object 'rooms'.....

what does this mean. I am trying to create an IIF statement, nothing
fancy,
but am getting this. Could someone explain

thanks

Lynn
 
DLookup is found in the Visual Basic help, not the normal ACCESS help.

Open the Visual Basic Editor, type DLookup in the "Ask a Question" box at
top right of window, and press Enter.
--

Ken Snell
<MS ACCESS MVP>



lynn atkinson said:
I would give that a go, but no matter what I enter in the help, I cannot
find
an explaination of the DLookup function. Any ideas how I find this?

Ken Snell said:
Assuming that you want to find the values for the fields (in rooms table)
from the table itself, you can use the DLookup function to get the value
from a field in a table or query. Take a look at Help info on it, and
then
post back if you need additional assistance; we'll be here!

--

Ken Snell
<MS ACCESS MVP>

lynn atkinson said:
thanks for your reply.

Rooms is a table; room capacity and max participants are fields in the
rooms
table. text 1010 is a calculated control on the form. room capacity or
max
participants do not appear as controls on this particular form, but
they
do
appear on another form, where the same calculation works ok., I assume
because it is referring to controls that exist on that form.

Not sure how I go about accessing the fields that are not in the
current
form.

Is there any good reading you can recommend on this sort of thing?



:

What is rooms -- a query? a table? Are the room capacity and other
"fields"
the names of fields in your form's recordsource? or the name of
controls
on
the form?

If rooms is the name of a table or query, you don't use ! operator
between
it and its field, you would use the . operator. However, a table or a
query
are not avaiable for "direct" reading in this manner; the query or
table
must be accessed by a recordset, by a domain function (DLookup,
DCount,
DSum, etc.), by binding a form to an SQL statement that is based on
the
table or query and then reference the fields from the form's
recordsource,
etc.

Assuming that room capacity, etc. are controls or fields in the form:

=IIf(IsNull([room capacity]),[max participants]-[text1010],IIf([room
capacity]<[max participants],([room capacity]-[text1010]),([max
participants]-[Text1010])))


--

Ken Snell
<MS ACCESS MVP>

message
I am trying to calculate the number of places available on a course.
The calculation which throws up the error is as follows

=IIf(IsNull([rooms]![room capacity]),[rooms]![max
participants]-[text1010],IIf([rooms]![room capacity]<[rooms]![max
participants],([rooms]![room capacity]-[text1010]),([rooms]![max
participants]-[Text1010])))

if the field 'room capacity' has no data in it, then use the max
participants field minus the text1010 (which is places already
booked)
to
give the number of places still available. none of these controls
except
text1010 are displayed on this sub form which is why I have tried to
refer
to
the table eg table=rooms, field=room capacity.

hope this makes sense!


:

It means that some part of your code or the setting for an event
property
is
telling ACCESS to go look for a table or query or control or some
other
object named "rooms".

Can you give us more details?
--

Ken Snell
<MS ACCESS MVP>


message
I am getting the error message as follows

the Object doesnt contain the automation object 'rooms'.....

what does this mean. I am trying to create an IIF statement,
nothing
fancy,
but am getting this. Could someone explain

thanks

Lynn
 
Back
Top