Connecting Tech Pros Worldwide Forums | Help | Site Map

combo / textfield problem

Newbie
 
Join Date: Oct 2006
Location: Slovenia
Posts: 1
#1: Oct 4 '06
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,

PEB's Avatar
PEB PEB is offline
Expert
 
Join Date: Aug 2006
Location: Bulgaria
Posts: 1,380
#2: Oct 8 '06

re: combo / textfield problem


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!

:)
Reply