Using SetValue - Form/Subform

  • Thread starter Thread starter Veli Izzet
  • Start date Start date
V

Veli Izzet

Hi all,

I have a form-subform combination for Sales. Sales form carries Customer
ID and also Sales data through a query.

SalesDetails subform carries Product Details including the "Where" field
[The products database has a "Where" field to show where the goods are.
(they may be in center, in shop A, B, etc.)]

Some sales are in consignment basis (Not final sale, the goods go to a
shop, but the money is not collected yet)

Of course one sale may contain more than one product.

The problem:

I want to set the Value of the "Where" field in the Products database to
the "CustomerAdress" field in the Customers database. So I need to pass
the data from the form to the records of the subform and use SetValue in
the subform like:

SetValue
item "CustomerAdress from the Sales Form"
control "Where"

How do I pass this CustomerAdress value to the subform?

Regards,
 
Veli Izzet said:
Hi all,

I have a form-subform combination for Sales. Sales form carries Customer
ID and also Sales data through a query.

SalesDetails subform carries Product Details including the "Where" field
[The products database has a "Where" field to show where the goods are.
(they may be in center, in shop A, B, etc.)]

Some sales are in consignment basis (Not final sale, the goods go to a
shop, but the money is not collected yet)

Of course one sale may contain more than one product.

The problem:

I want to set the Value of the "Where" field in the Products database to
the "CustomerAdress" field in the Customers database. So I need to pass
the data from the form to the records of the subform and use SetValue in
the subform like:

SetValue
item "CustomerAdress from the Sales Form"
control "Where"

How do I pass this CustomerAdress value to the subform?

Regards,

Hi Veli,

Pardon me if this seems like a stupid question but you do know that forms
are just "windows" into tables so humans can play with the data? Access
can put any piece of data anywhere you want without using a form.

It sounds like you could just add the "Customers" table to one of your
existing query's linked by "CustomerID" and you would have the
"CustomerAdress" where you need it.

hth
 
Well RuralGuy,

My question may sound as a stupid one to you, however had I known the
way to do I would not have asked it in the first place.

Sorry to use your time and bandwidth.


Hi all,

I have a form-subform combination for Sales. Sales form carries Customer
ID and also Sales data through a query.

SalesDetails subform carries Product Details including the "Where" field
[The products database has a "Where" field to show where the goods are.
(they may be in center, in shop A, B, etc.)]

Some sales are in consignment basis (Not final sale, the goods go to a
shop, but the money is not collected yet)

Of course one sale may contain more than one product.

The problem:

I want to set the Value of the "Where" field in the Products database to
the "CustomerAdress" field in the Customers database. So I need to pass
the data from the form to the records of the subform and use SetValue in
the subform like:

SetValue
item "CustomerAdress from the Sales Form"
control "Where"

How do I pass this CustomerAdress value to the subform?

Regards,


Hi Veli,

Pardon me if this seems like a stupid question but you do know that forms
are just "windows" into tables so humans can play with the data? Access
can put any piece of data anywhere you want without using a form.

It sounds like you could just add the "Customers" table to one of your
existing query's linked by "CustomerID" and you would have the
"CustomerAdress" where you need it.

hth
 
Veli Izzet said:
Well RuralGuy,

My question may sound as a stupid one to you, however had I known the
way to do I would not have asked it in the first place.

Sorry to use your time and bandwidth.

Sorry Veli,

I guess that did not come out very well. I truly did not intend to upset
or insult you. Is there a "CustomerID" field in your "Products" table, if
that makes any sense? If so you could join them with the Query Builder on
the CustomerID field and have the "CustomerAdress" just show up in the
SubForm.

hth
 
Back
Top