Automatic Population

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
I am not sure from your description but couldn't you use two SetValue
actions to set the 2 TextBoxes in your Macro?
 
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.
 
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.
 
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
 
* 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?
 
Thank you very much. The column count only showed 1. as soon as I changed it
it started working.
I really appreciate your help
 
Back
Top