469,644 Members | 2,011 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

Access Automating

Hello all, I have been searching the net endlessly and found this ng, so I
thought I would give a try. Anyways, I have a few problems I am trying to
implement a combo box which presently contains the following: Description,
Price, and Treatment code. I wish to do the following: when the description
field(combo box) is clicked I want the price, treatment code, insured field
to become automated(update the corresponding data automatically). At the
present time 3 out the for 4 fields are updating fine. Basically the
description field contains the products and services offered. I used a check
box(boolean value) to be able to tell the difference as to what insurance %
should be applied,however, it is not working. Furthermore, the field used
for the insured % is used further for more calculations. Is there not a way
I can just set the field to read to the correct value in visual basic. I get
the following error at the present time.

Run-time error ' 2147352567(80020009)'
You can't assign a value to this object.

Private Sub ProductID_AfterUpdate()
Me![UnitPrice] = Me![ProductID].Column(2)
Me![ProductCode] = Me![ProductID].Column(3)
Me.Foot = Me![ProductID].Column(4)
Me.Pod = Me![ProductID].Column(5)


End Sub

any feed back greatly appreciated.
Thanks in advance
Jun 26 '06 #1
2 3033
Which field isn't updating, and what kind of control is it? I don't
understand why you're trying to duplicate the information on the form,
because you're pulling the values from your dropdown.

I notice you're also using dots and bangs interchangeably. You may
want to browse through this as it may also be part of your problem:

Addressing Objects and Collections
Access provides a method that lets you address anything within your
database. Since objects and collections form a hierarchical system, it
may be helpful to compare the Access address system to a similar system
you should already be familiar with--the directory structure on your
disk drive.

As you move through different levels in a directory structure, you
indicate a change in level using a backslash. For example, consider the
following pathname:

C:\WINDOWS\SYSTEM\SYSEDIT.EXE

As you read the pathname from right to left, you learn that the
SYSEDIT.EXE file is in the SYSTEM directory, which is within the
WINDOWS directory, which is on the C: drive. Each backslash indicates
you are moving down a level in the directory structure, when reading
from left to right. In Access, you use exclamation points (!) and
periods (.) to denote changes in the level. The exclamation points are
called bangs, and the periods are called dots. The general rules which
govern the use of bangs and dots are as follows:

You use a bang before objects you have named.
If a name contains spaces, you surround it with brackets, as in [Zip
Code].
You use a dot before objects, properties, or methods named by Access.

How do you apply these rules? Simple. Suppose you want to refer to the
Business Customers table you created earlier in this book. This table
is part of the Customer database, so you can address it as follows:

Customer![Business Customers]

Notice the brackets around the table name and the bang between levels
of the hierarchy. If you want to refer to a property within the table,
you can use a dot and the property name, as in the following:

Customer![Business Customers].RecordCount

Michael Bialowas wrote:
Hello all, I have been searching the net endlessly and found this ng, so I
thought I would give a try. Anyways, I have a few problems I am trying to
implement a combo box which presently contains the following: Description,
Price, and Treatment code. I wish to do the following: when the description
field(combo box) is clicked I want the price, treatment code, insured field
to become automated(update the corresponding data automatically). At the
present time 3 out the for 4 fields are updating fine. Basically the
description field contains the products and services offered. I used a check
box(boolean value) to be able to tell the difference as to what insurance %
should be applied,however, it is not working. Furthermore, the field used
for the insured % is used further for more calculations. Is there not a way
I can just set the field to read to the correct value in visual basic. I get
the following error at the present time.

Run-time error ' 2147352567(80020009)'
You can't assign a value to this object.

Private Sub ProductID_AfterUpdate()
Me![UnitPrice] = Me![ProductID].Column(2)
Me![ProductCode] = Me![ProductID].Column(3)
Me.Foot = Me![ProductID].Column(4)
Me.Pod = Me![ProductID].Column(5)


End Sub

any feed back greatly appreciated.
Thanks in advance


Jun 27 '06 #2
Hello, thank you for you immediate response. I was able to correct that
problem of spliting the insurance field into two separate fields. However,
at the present time I still have a problem. The problem is giving me an
error which is run-time error '13' type mismatch. The odd thing is that all
3 fields have the same data type and format. I am using a drop down combo
box for the productName and depending on which product is selected the
proper insurance field should become automated; which it does. However, I am
using another field that is to be used while doing some calculations on that
data. So, I wish to store the proper insurance into the corresponding
insurance field then assign that value to another field so that the
calculations can be made on that value. Right now I am able to select one
type of product which works perfectly, however, when I select the other type
of product which has a different insurance plan I get the run time error.
Here is a snippet of what I have right now that is causing the problem.

Private Sub Combo106_AfterUpdate()
Me![UnitPrice] = Me![Combo106].Column(1)
Me![ProductCode] = Me![Combo106].Column(2)
Me![Pod] = Me![Combo106].Column(3)
Me![Foot] = Me![Combo106].Column(4)

If Me![Combo106].Column(3) Then
Me![Discount].Value = Me![Combo106].Column(3)
Else
Me![Discount].Value = Me![Combo106].Column(4)
End If

Any feedback is greatly appreciated.
Thanks in advance...
"ManningFan" <ma********@gmail.com> wrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Which field isn't updating, and what kind of control is it? I don't
understand why you're trying to duplicate the information on the form,
because you're pulling the values from your dropdown.

I notice you're also using dots and bangs interchangeably. You may
want to browse through this as it may also be part of your problem:

Addressing Objects and Collections
Access provides a method that lets you address anything within your
database. Since objects and collections form a hierarchical system, it
may be helpful to compare the Access address system to a similar system
you should already be familiar with--the directory structure on your
disk drive.

As you move through different levels in a directory structure, you
indicate a change in level using a backslash. For example, consider the
following pathname:

C:\WINDOWS\SYSTEM\SYSEDIT.EXE

As you read the pathname from right to left, you learn that the
SYSEDIT.EXE file is in the SYSTEM directory, which is within the
WINDOWS directory, which is on the C: drive. Each backslash indicates
you are moving down a level in the directory structure, when reading
from left to right. In Access, you use exclamation points (!) and
periods (.) to denote changes in the level. The exclamation points are
called bangs, and the periods are called dots. The general rules which
govern the use of bangs and dots are as follows:

You use a bang before objects you have named.
If a name contains spaces, you surround it with brackets, as in [Zip
Code].
You use a dot before objects, properties, or methods named by Access.

How do you apply these rules? Simple. Suppose you want to refer to the
Business Customers table you created earlier in this book. This table
is part of the Customer database, so you can address it as follows:

Customer![Business Customers]

Notice the brackets around the table name and the bang between levels
of the hierarchy. If you want to refer to a property within the table,
you can use a dot and the property name, as in the following:

Customer![Business Customers].RecordCount

Michael Bialowas wrote:
Hello all, I have been searching the net endlessly and found this ng, so I thought I would give a try. Anyways, I have a few problems I am trying to implement a combo box which presently contains the following: Description, Price, and Treatment code. I wish to do the following: when the description field(combo box) is clicked I want the price, treatment code, insured field to become automated(update the corresponding data automatically). At the
present time 3 out the for 4 fields are updating fine. Basically the
description field contains the products and services offered. I used a check box(boolean value) to be able to tell the difference as to what insurance % should be applied,however, it is not working. Furthermore, the field used for the insured % is used further for more calculations. Is there not a way I can just set the field to read to the correct value in visual basic. I get the following error at the present time.

Run-time error ' 2147352567(80020009)'
You can't assign a value to this object.

Private Sub ProductID_AfterUpdate()
Me![UnitPrice] = Me![ProductID].Column(2)
Me![ProductCode] = Me![ProductID].Column(3)
Me.Foot = Me![ProductID].Column(4)
Me.Pod = Me![ProductID].Column(5)


End Sub

any feed back greatly appreciated.
Thanks in advance

Jun 27 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Mark Lees | last post: by
4 posts views Thread by Andrew Chanter | last post: by
4 posts views Thread by Supa Hoopsa | last post: by
5 posts views Thread by Kip | last post: by
13 posts views Thread by evancater | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.