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(m ynumber)
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.IDC AT)=[SubFormOrder]!IDCAT)) ORDER BY PRODUCTS .Name;
If i add [Forms]! infront of [SubFormOrder] then the subform will not work.
Thanks,
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(m ynumber)
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.IDC AT)=[SubFormOrder]!IDCAT)) ORDER BY PRODUCTS .Name;
If i add [Forms]! infront of [SubFormOrder] then the subform will not work.
Thanks,
Comment