473,324 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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 3208
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Mark Lees | last post by:
How does one increase their Access skills? I'm creating a basic DB for a non-profit organization. I would classify myself as an advanced beginner. I've got some help books but it seems they...
4
by: Andrew Chanter | last post by:
I have a VB app that has a routine that runs macros in a (password protected) Access 97 db. (I have attached the code below.) Most of these macros end up opening a form in the Access db for the...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
12
by: Bookreader | last post by:
I tried Googling this but I get a whole lot of replies about running the SQL statement in VB via ADO. All I want to do is run an existing ACCESS 2000 query from VB with no information returned...
4
by: Supa Hoopsa | last post by:
I am in the process of rewriting an MS Access application (access front end with SQL 2k database) in VB.NET and one of the things I would like to do is link in to the compiled Access ADE so that I...
1
by: garry.oxnard | last post by:
Can anyone help me to solve a problem which involves switching from Access to Excel (then back to Access) programatically please? I have an Excel template which, on open, also opens an Access...
5
by: Kip | last post by:
I have an office with approx 8 people. I have used Access with a Form on my personal PC for client records. I was wondering if I could put the Access table on a server and put shortcuts on each...
4
by: attachmatey | last post by:
Greetings: I'm looking for some help in automating (what I thought would be) a simple procedure in Internet Explorer. I'm trying to put the following operation under a button click in an MS...
4
by: khan091 | last post by:
m automating ie ,want to access the lists in it ,can any one help me out ????
13
by: evancater | last post by:
My client wants to make their Access 2007 database available to offices around the country with multi-user permissions set to control access to the tables and forms, etc. The easiest thing would be...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.