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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
* 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
|
|||
|
|||
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 | |
|
|
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 |