By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,030 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,030 IT Pros & Developers. It's quick & easy.

combo / textfield problem

P: 1
Hi all,

First let m say that i did search and found lots of answers to my problem and have solved it partial.

I have a main form that include subform.

I needed to get the data from combo box to be shown in textfield in a (continuous) subform.

Found the solution:
IDCode.column(mynumber)

Now this works great, but i have realize that coz this textfield is acutally a meant for Price for my products, the calculation is not working properly when trying to calculate quantity and price.

Example:
In subform i have
Code
Name ( combbox)
Quantity
Unitprice
Value

and then i have in footer of subform:
SubTotal:
VAT:
Total:

Can any1 explain me how should my code look like so that i will get price from combo box to textfield and that my calculation will work properly??

Also...
How could i add 1 more combobox in subform that will have categories and if i decide to pick from category1 the 2nd combo box that is also in subform will show items only from that category??

I manage to do it outside the subform, but it's not wroking inside subform.
It always shows items from category1 .

Here's my code:
SELECT DISTINCT PRODUCTS.ID, PRODUCTS.Name, FROM PRODUCTS WHERE (((PRODUCTS.IDCAT)=[SubFormOrder]!IDCAT)) ORDER BY PRODUCTS .Name;


If i add [Forms]! infront of [SubFormOrder] then the subform will not work.
Thanks,
Oct 4 '06 #1
Share this Question
Share on Google+
1 Reply


PEB
Expert 100+
P: 1,418
PEB
Hi to reference a subform You need a structure like:

=Forms![Elements]![Element_info Subform].[Form]![ACTIV_LINE_N]

Where Elements is the main form

Element_info Subform - the sub form control in your main form

AND
ACTIV_LINE_N - a field in your Subform!

:)
Oct 8 '06 #2

Post your reply

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