A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Automatic Population



 
 
Thread Tools Display Modes
  #1  
Old April 16th, 2005, 02:22 AM
Anonymous
external usenet poster
 
Posts: n/a
Default Automatic Population

I am building a system to rent videos. When the video bar code is entered I
want this to populate two fields. One firld with the rental price and the
other field with the sale price in case the customer would like to buy the
video instead. I can run a macro to set the value of 1 box, but I can't get
it to set the value of the second box because the value is different.
If you can help me I would appreciate it.

thank you.
  #2  
Old April 16th, 2005, 03:36 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

I am not sure from your description but couldn't you use two SetValue
actions to set the 2 TextBoxes in your Macro?

--
HTH
Van T. Dinh
MVP (Access)




"Anonymous" wrote in message
...
I am building a system to rent videos. When the video bar code is entered

I
want this to populate two fields. One firld with the rental price and the
other field with the sale price in case the customer would like to buy the
video instead. I can run a macro to set the value of 1 box, but I can't

get
it to set the value of the second box because the value is different.
If you can help me I would appreciate it.

thank you.



  #3  
Old April 16th, 2005, 03:51 AM
Anonymous
external usenet poster
 
Posts: n/a
Default

When I use the setvalue the combo box has a bound value with it. So I can't
figure out how to set the value of the second text box to a different column
in the same query. Logically I should be able to, but I can't get it to work.
It gives me an error message that I can't figure out.
The object doesn't contain the automation object 'qryRental_Price'

qryRental_Price is the query I used for both of the values. but I don't
understand the part about the object not containing the automation object.

"Van T. Dinh" wrote:

I am not sure from your description but couldn't you use two SetValue
actions to set the 2 TextBoxes in your Macro?

--
HTH
Van T. Dinh
MVP (Access)




"Anonymous" wrote in message
...
I am building a system to rent videos. When the video bar code is entered

I
want this to populate two fields. One firld with the rental price and the
other field with the sale price in case the customer would like to buy the
video instead. I can run a macro to set the value of 1 box, but I can't

get
it to set the value of the second box because the value is different.
If you can help me I would appreciate it.

thank you.




  #4  
Old April 16th, 2005, 04:13 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

It has been years since I touched Macros (except for AutoKeys Macro and I
almost exclusively use RunCode Macro action to run VBA codes, anyway) but
try:

Action: SetValue
Item: SalesPriceTextBox
Expression: ComboBox.Column(IndexForPriceColumn)

Note: the Index is probably zero-based, i.e. first Col has index 0, second
Col has index 1, ... I am sure you will find the correct index.

--
HTH
Van T. Dinh
MVP (Access)



"Anonymous" wrote in message
...
When I use the setvalue the combo box has a bound value with it. So I

can't
figure out how to set the value of the second text box to a different

column
in the same query. Logically I should be able to, but I can't get it to

work.
It gives me an error message that I can't figure out.
The object doesn't contain the automation object 'qryRental_Price'

qryRental_Price is the query I used for both of the values. but I don't
understand the part about the object not containing the automation object.



  #5  
Old April 16th, 2005, 05:31 AM
Anonymous
external usenet poster
 
Posts: n/a
Default

It isn't working, although I think it should. For some reason that index isnt
working. the query it is based off of has 3 columns Column 1 is the ID column
2 is the rental price and column 3 is the sale price. When I use column 1 or
2 (index 0 or 1) I get the correct answersbut when I try to use the third one
(2) I get blank. Any ideas on this?
I can clearly see that the 3rd column has something in it.

thanks for your help

"Van T. Dinh" wrote:

It has been years since I touched Macros (except for AutoKeys Macro and I
almost exclusively use RunCode Macro action to run VBA codes, anyway) but
try:

Action: SetValue
Item: SalesPriceTextBox
Expression: ComboBox.Column(IndexForPriceColumn)

Note: the Index is probably zero-based, i.e. first Col has index 0, second
Col has index 1, ... I am sure you will find the correct index.

--
HTH
Van T. Dinh
MVP (Access)



"Anonymous" wrote in message
...
When I use the setvalue the combo box has a bound value with it. So I

can't
figure out how to set the value of the second text box to a different

column
in the same query. Logically I should be able to, but I can't get it to

work.
It gives me an error message that I can't figure out.
The object doesn't contain the automation object 'qryRental_Price'

qryRental_Price is the query I used for both of the values. but I don't
understand the part about the object not containing the automation object.




  #6  
Old April 16th, 2005, 06:00 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

* Does the query that you used as the RowSource of the ComboBox return at
least 3 Columns?

* Does the ColumnCount property of the ComboBox show 3 or more?

--
HTH
Van T. Dinh
MVP (Access)



"Anonymous" wrote in message
...
It isn't working, although I think it should. For some reason that index

isnt
working. the query it is based off of has 3 columns Column 1 is the ID

column
2 is the rental price and column 3 is the sale price. When I use column 1

or
2 (index 0 or 1) I get the correct answersbut when I try to use the third

one
(2) I get blank. Any ideas on this?
I can clearly see that the 3rd column has something in it.

thanks for your help



  #7  
Old April 16th, 2005, 06:08 AM
Anonymous
external usenet poster
 
Posts: n/a
Default

Thank you very much. The column count only showed 1. as soon as I changed it
it started working.
I really appreciate your help

"Van T. Dinh" wrote:

* Does the query that you used as the RowSource of the ComboBox return at
least 3 Columns?

* Does the ColumnCount property of the ComboBox show 3 or more?

--
HTH
Van T. Dinh
MVP (Access)



"Anonymous" wrote in message
...
It isn't working, although I think it should. For some reason that index

isnt
working. the query it is based off of has 3 columns Column 1 is the ID

column
2 is the rental price and column 3 is the sale price. When I use column 1

or
2 (index 0 or 1) I get the correct answersbut when I try to use the third

one
(2) I get blank. Any ideas on this?
I can clearly see that the 3rd column has something in it.

thanks for your help




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic field population Reepicheep Using Forms 2 February 26th, 2005 06:25 PM
question regarding automatic population of fields Lauren B. Using Forms 3 January 6th, 2005 10:27 PM
Automatic population of combo boxes SaraM Using Forms 1 August 20th, 2004 03:59 AM


All times are GMT +1. The time now is 12:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.