473,326 Members | 2,126 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,326 software developers and data experts.

Conditional format help.

18
I am building another data base for invoices. I have two tables on is for the invoices, one is for the parts.

The invoice table contains several fields. for the customer info and for the orders to be stored in.

The Part table consists of fields
part #
Serial #
description
Price

The form that I created for the invoice, i want to have conditional formatiing for the part info for example:

When part # 001 is selected from the drop down box that is connected to the part table then it automatically fills in the serial description and price into the appropriate fields on the form. I then want the price field multiplied multiplied by the quanity field to bring a total. into the total field. Then a sub total at the bottom.

If anyone can help me with how to do this it would be greatly appreciate. Oh yeah I am running with MS ACCESS 2000. If any further info is needed let me know.

Thanks a lot
May 8 '07 #1
16 1980
Rabbit
12,516 Expert Mod 8TB
You could just set the control source of the textboxes to DLookup the appropriate fields.
May 8 '07 #2
PCCTN
18
You could just set the control source of the textboxes to DLookup the appropriate fields.
But would it automatically look up the info. They are different fields?
May 8 '07 #3
Rabbit
12,516 Expert Mod 8TB
But would it automatically look up the info. They are different fields?
It would automatically lookup whenever your combobox changes because the control source would be tied to the value of the combobox.
May 8 '07 #4
PCCTN
18
It would automatically lookup whenever your combobox changes because the control source would be tied to the value of the combobox.
I'm sorry but I dont think that I am understanding. The first field on the form is a combo box which is the part #, the next field would be a text box which is serial number, the next is a text/ description and the next is text box/ price.

Do I do the dlookup on the combo box or the text box... and what exactly do I put in for the appropriate field.

Again Sorry I am fairly new to this.
May 8 '07 #5
Rabbit
12,516 Expert Mod 8TB
I'm sorry but I dont think that I am understanding. The first field on the form is a combo box which is the part #, the next field would be a text box which is serial number, the next is a text/ description and the next is text box/ price.

Do I do the dlookup on the combo box or the text box... and what exactly do I put in for the appropriate field.

Again Sorry I am fairly new to this.
You'd put it in the control source property of the textbox. You'll want to look up the DLookup function in the help files as that'll provide you an explanation of all the intricacies and examples.
May 8 '07 #6
PCCTN
18
You'd put it in the control source property of the textbox. You'll want to look up the DLookup function in the help files as that'll provide you an explanation of all the intricacies and examples.
But the control source needs to point to where I want the data stored. I am more looking for an After Update type thing. Just dont know what to put.
May 8 '07 #7
JConsulting
603 Expert 512MB
But the control source needs to point to where I want the data stored. I am more looking for an After Update type thing. Just dont know what to put.

in the after update event of your combo box

me.mytextfield = me.mycombo.column(x)

where x is the appropriate field you're trying to populate.

J
May 8 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
Set the Row Source of the combo box to ...
Expand|Select|Wrap|Line Numbers
  1. SELECT  [part #], [Serial #], description, Price FROM Part
You can hide the extra columns by setting their column width to 0.

Then in the After Update event of the combo box put the following:

Expand|Select|Wrap|Line Numbers
  1. Private Sub ComboboxName_AfterUpdate()
  2.    Me![Serial #] = Me!ComboboxName.Column(1)
  3.    Me!description = Me!ComboboxName.Column(2)
  4.    Me!Price = Me!ComboboxName.Column(3)
  5. End Sub
Mary
May 8 '07 #9
MMcCarthy
14,534 Expert Mod 8TB
in the after update event of your combo box

me.mytextfield = me.mycombo.column(x)

where x is the appropriate field you're trying to populate.

J
Congratulations on the new status J.
May 8 '07 #10
JConsulting
603 Expert 512MB
Congratulations on the new status J.
Thank you!!
They still haven't shown me the secret handshake ;)
J
May 8 '07 #11
MMcCarthy
14,534 Expert Mod 8TB
Thank you!!
They still haven't shown me the secret handshake ;)
J
Sshh! It's a secret.

Send me a PM if you need anything.

Mary
May 8 '07 #12
Rabbit
12,516 Expert Mod 8TB
Thank you!!
They still haven't shown me the secret handshake ;)
J
<_<
>_>

/whispers It's up, up, down, down, left, right, left, right, B, A
May 9 '07 #13
PCCTN
18
Set the Row Source of the combo box to ...
Expand|Select|Wrap|Line Numbers
  1. SELECT  [part #], [Serial #], description, Price FROM Part
You can hide the extra columns by setting their column width to 0.

Then in the After Update event of the combo box put the following:

Expand|Select|Wrap|Line Numbers
  1. Private Sub ComboboxName_AfterUpdate()
  2.    Me![Serial #] = Me!ComboboxName.Column(1)
  3.    Me!description = Me!ComboboxName.Column(2)
  4.    Me!Price = Me!ComboboxName.Column(3)
  5. End Sub
Mary

Thank you for that. I keep getting an error though. It takes me to the debugger and Highlights the Me!Serial = Me!Part_Number1.Column(1) it says that the serial is null. But there is data in that Field
May 9 '07 #14
PCCTN
18
Thank you for that. I keep getting an error though. It takes me to the debugger and Highlights the Me!Serial = Me!Part_Number1.Column(1) it says that the serial is null. But there is data in that Field

Expand|Select|Wrap|Line Numbers
  1. Private Sub Part_Number1_AfterUpdate()
  2.    Me!Serial = Me!Part_Number1.Column(1)
  3.    Me!Description = Me!Part_Number1.Column(2)
  4.    Me!Price = Me!Part_Number1.Column(3)
  5. End Sub
That is the code that I have set up. The field names in the table are
Part number
serial
description
price

the combobox name on the table is
Part Number1

Followed by text boxes
Serial
Description
Price

After I select the Part Number1 I want the other fields to fill in automatically.

The error that I am getting is "Run time error '2465' MS Access cannot find the field 'Part_Number1' refered to in your expression."

It then gives me the option to Debug,
When you go to the debugger, Me!Serial = Me!Part_Number1.Column(1) is highlighted and when you mouse over it says "Me!Serial = Null" but there is data in that field
May 9 '07 #15
PCCTN
18
Never mind everyone I found the problem... It was the space in the name of the combo box. Thank you all for all of your Help I love you guys
May 9 '07 #16
MMcCarthy
14,534 Expert Mod 8TB
Never mind everyone I found the problem... It was the space in the name of the combo box. Thank you all for all of your Help I love you guys
You're welcome.
May 9 '07 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
6
by: Allan Koch | last post by:
Dear NG, I would like to format a record in a subform, dependent on a value in one field. If one field in the record I show in a subform (datasheet view) is true I like to view that particular...
8
by: Dimitri Furman | last post by:
Given: Access 2002/2003 A subform in datasheet or continuous view, placed on a tab page (this last may or may not matter) Conditional formatting applied to some controls on the subform - format...
5
by: John Baker | last post by:
Hi: I have a field that i wish to use the conditional format capability on, and for some reason it wont work. The field is a a text box: =- I would like to make it red when negative, and...
0
by: Paul T. Rong | last post by:
I don't know why that I lost track of the post. I found it from the newsgroup and paste last two posts. Pieter Linden said: "To do this - use conditional formatting..." I didn' work it out....
2
by: Sara | last post by:
The problem: Conditional formatting bold, red when field Value < date() sets the field background to white - always - whether condition is met or not. I want the field unfilled and just red/bold...
6
by: Marc Jennings | last post by:
Hi there, I am trying to get some conditional functionality into some of my apps. I can use the format : private void doStuff() { //do something }
3
by: Smiley | last post by:
Hi, I know how to do confitional formating in Excel by clicking the wizard. Is this possible in MS Access ? If so, please directly where to look. I found example but nothing as to how to do it....
10
by: afromanam | last post by:
Regards, Please help What I'm trying to do is this: (and I can't use reports since I must export to Excel) I export some queries to different tabs in an excel workbook I then loop through...
4
by: riaane | last post by:
Please help: I have Conditional Formatting on a Report Field that fills the background Red if the criteria is met. This displays correctly in Report View, however, when I "OutputTo" this report to...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.