473,386 Members | 1,958 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,386 software developers and data experts.

Automatic Population of fields

I've got a budgeting database, and when entering expenses, the user has
an option of payment type (credit card, cash, PO) if the user selects
PO, they have to enter the PO number from a drop down.
Since PO's are assigned to a specific supplier, I'd like the supplier
field (currently a drop-down) to be automatically populated when the PO
number is selected. But that field need to be filled manually for
credit card or cash purchases.

Any suggestions would be appreciated.

--
Sean T. Evans

Nov 13 '05 #1
4 1847
If you're using a drop-down, you can add the supplier as a second,
hidden column, then pass the text on to the supplier drop-down.

Basically, setup the PO drop-down to include the Supplier ID (or name
if that's what's in the supplier drop-down). When the user selects a PO
- in the AfterUpdate event add some code to pass the second column of
the drop-down to the other drop-down. E.G.:

cboSupplier = cboPO.Column(1)

Lemme know if you need more info.

Russell Sinclair

Nov 13 '05 #2
I'm not sure where I've messed up, but here's what I've got

Private Sub PO_Drop_AfterUpdate()
Me.Supplier_ID = Me.PO_Drop.Column(5)
End Sub

The PO_Drop combo box is pulled from a query that gets:
PO_ID, PO_Number, Supplier_Name, Account_Name, Supplier_ID, Account_ID

I couldn't understand where cboSupplier... went, I tried it in the
AfterUpdate option of properties, but that didn't seem to work. It
seemed to think that was a macro.

I'm not getting any kind of error message, just not getting any change
in the Supplier_ID combo box.

Thanks for the help thus far.

Nov 13 '05 #3
"morydd" <se********@americangirl.com> wrote in
news:11**********************@o13g2000cwo.googlegr oups.com:
I'm not sure where I've messed up, but here's what I've got

Private Sub PO_Drop_AfterUpdate()
Me.Supplier_ID = Me.PO_Drop.Column(5)
End Sub

The PO_Drop combo box is pulled from a query that gets:
PO_ID, PO_Number, Supplier_Name, Account_Name, Supplier_ID,
Account_ID

I couldn't understand where cboSupplier... went, I tried it in
the AfterUpdate option of properties, but that didn't seem to
work. It seemed to think that was a macro.

I'm not getting any kind of error message, just not getting
any change in the Supplier_ID combo box.

Thanks for the help thus far.

Since the column() count is Zero-based, you are updating with the
Account_id. Try Me.Supplier_ID = Me.PO_Drop.Column(4)

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #4
It's always the little things that get you. Thanks for the reminder. It
seems to work like a charm now.

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Eric O. Angell | last post by:
Say I have class Header: def __init__(self): self.foo = 0 # ... more fields and I have some commandline options that can specify better values for things in the header, such as foo. If I try...
46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
1
by: Rene Crespo | last post by:
Hello, Sorry about the length of this explanation! I am using Access 2000 to assist an export sales department keep track of its weekly offers of products to clients. The database already...
2
by: Kenny G | last post by:
Currently I have four datetime fields: DteTimeNotified DteTimeStarted DteTimeCompleted DteTimeReported Each of these fields contain the input mask 99/99/00" "00:00;0 This gives me a short...
0
by: robert | last post by:
I'm looking for an efficient optimizer on a noisy high-dimensional and costly function. My own GA hack seems to be somewhat stiff and I find me trying too much around with different cooling speeds...
14
by: neonman14 | last post by:
Hello I am in Intro to Java Programming and I am having problems with assignment. The Homework assignment is called Population. Population Write a program that will predict the size of a...
16
by: nkoriginal | last post by:
I want an automatic insert. I've an ASP page with more than 50 fields (form) and I want to an insert all that information in a table in SQL server 2005. Now, I've statments for insert BUT I need...
3
by: Author | last post by:
If we do automatic property, we don't declare the private fields because the compiler will generate them for us. Then, how do we implement a constructor that takes the private fields as its...
1
by: Clive Swan | last post by:
Hi I am trying to sum a population field that may have 140 records for each Ward (example). Any suggestions on the best way to do this. I would like to have a unique record for each Ward...
1
by: tg | last post by:
http://img522.imageshack.us/img522/8647/scan10005ci7.jpg As a percentage of world inhabitants, the white population will plummet to a single digit (9.76%) by 2060 from a high-water mark of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.