Make and call module

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have about 100 forms in datasheet view...
How to put this code in module and call from form, in On Current event?

Me.[Column1].ColumnWidth = 1016
Me.[Column2].ColumnWidth = 780
Me.[Column3].ColumnWidth = 1950

Thanks!
 
To my knowledge, there is no columnwidth property in any form. All controls
on forms have a width property
Me.txtLastName.Width = 2880
would set the control named txtLastName to 2"
Since each form is going to be specifc to the controls on the form, I don't
see how you can do this globally. 100 forms is a lot of forms. Is there any
reason you have so many?
 
I must create many forms for each product from plants in my company.
Each product have daily many analysys. My database is linked to SharePoint
server.

„Klatuu“ said:
To my knowledge, there is no columnwidth property in any form. All controls
on forms have a width property
Me.txtLastName.Width = 2880
would set the control named txtLastName to 2"
Since each form is going to be specifc to the controls on the form, I don't
see how you can do this globally. 100 forms is a lot of forms. Is there any
reason you have so many?

Igor G. said:
I have about 100 forms in datasheet view...
How to put this code in module and call from form, in On Current event?

Me.[Column1].ColumnWidth = 1016
Me.[Column2].ColumnWidth = 780
Me.[Column3].ColumnWidth = 1950

Thanks!
 
I am not familiar with using Sharepoint, so I can't help you there.

Why does each product need a separate form? Normally, you would have one
form and be able to select a product to view or edit. I really believe you
need to reconsider your design.

Igor G. said:
I must create many forms for each product from plants in my company.
Each product have daily many analysys. My database is linked to SharePoint
server.

„Klatuu“ said:
To my knowledge, there is no columnwidth property in any form. All controls
on forms have a width property
Me.txtLastName.Width = 2880
would set the control named txtLastName to 2"
Since each form is going to be specifc to the controls on the form, I don't
see how you can do this globally. 100 forms is a lot of forms. Is there any
reason you have so many?

Igor G. said:
I have about 100 forms in datasheet view...
How to put this code in module and call from form, in On Current event?

Me.[Column1].ColumnWidth = 1016
Me.[Column2].ColumnWidth = 780
Me.[Column3].ColumnWidth = 1950

Thanks!
 
I have 22 "master form" (plants) with sub-forms (products) in Tab Control.
This works OK, but is very complicate to any global changes.
Thanks!

„Klatuu“ said:
I am not familiar with using Sharepoint, so I can't help you there.

Why does each product need a separate form? Normally, you would have one
form and be able to select a product to view or edit. I really believe you
need to reconsider your design.

Igor G. said:
I must create many forms for each product from plants in my company.
Each product have daily many analysys. My database is linked to SharePoint
server.

„Klatuu“ said:
To my knowledge, there is no columnwidth property in any form. All controls
on forms have a width property
Me.txtLastName.Width = 2880
would set the control named txtLastName to 2"
Since each form is going to be specifc to the controls on the form, I don't
see how you can do this globally. 100 forms is a lot of forms. Is there any
reason you have so many?

:

I have about 100 forms in datasheet view...
How to put this code in module and call from form, in On Current event?

Me.[Column1].ColumnWidth = 1016
Me.[Column2].ColumnWidth = 780
Me.[Column3].ColumnWidth = 1950

Thanks!
 
My point, exactly.

If your 22 plants work off the same table or query, then you could do it
with one form. Same for products.

Now if you tell my you have a separate table for each plant, your database
design needs correcting. All the plants should be in one table. You only
need a field in the table that identifies the plant. You can filter you form
on the plant you want to work with. The way that is usually done is with a
combo box that has a row source of the field in the plants table that
identifies the plant. When you select a plant from the combo, it will make
that plant the current record. The same holds true for products. If you set
up the link master/child property of the subform control, any time you select
a different plant, the subform will pull up the products related to that
plant.

Question - Does each plant have unique products or does every plant make
every product, or is a product made by some plants?

Igor G. said:
I have 22 "master form" (plants) with sub-forms (products) in Tab Control.
This works OK, but is very complicate to any global changes.
Thanks!

„Klatuu“ said:
I am not familiar with using Sharepoint, so I can't help you there.

Why does each product need a separate form? Normally, you would have one
form and be able to select a product to view or edit. I really believe you
need to reconsider your design.

Igor G. said:
I must create many forms for each product from plants in my company.
Each product have daily many analysys. My database is linked to SharePoint
server.

„Klatuu“ wrote:

To my knowledge, there is no columnwidth property in any form. All controls
on forms have a width property
Me.txtLastName.Width = 2880
would set the control named txtLastName to 2"
Since each form is going to be specifc to the controls on the form, I don't
see how you can do this globally. 100 forms is a lot of forms. Is there any
reason you have so many?

:

I have about 100 forms in datasheet view...
How to put this code in module and call from form, in On Current event?

Me.[Column1].ColumnWidth = 1016
Me.[Column2].ColumnWidth = 780
Me.[Column3].ColumnWidth = 1950

Thanks!
 
Each plant have unique products/half-products (oil company). I have daily
more than 2000 enters in lab. Each plant store data in own table, and field
in table identifies product. This is too much data for just one table.
The way with combos and one table I make in second database for other
products.

„Klatuu“ said:
My point, exactly.

If your 22 plants work off the same table or query, then you could do it
with one form. Same for products.

Now if you tell my you have a separate table for each plant, your database
design needs correcting. All the plants should be in one table. You only
need a field in the table that identifies the plant. You can filter you form
on the plant you want to work with. The way that is usually done is with a
combo box that has a row source of the field in the plants table that
identifies the plant. When you select a plant from the combo, it will make
that plant the current record. The same holds true for products. If you set
up the link master/child property of the subform control, any time you select
a different plant, the subform will pull up the products related to that
plant.

Question - Does each plant have unique products or does every plant make
every product, or is a product made by some plants?

Igor G. said:
I have 22 "master form" (plants) with sub-forms (products) in Tab Control.
This works OK, but is very complicate to any global changes.
Thanks!

„Klatuu“ said:
I am not familiar with using Sharepoint, so I can't help you there.

Why does each product need a separate form? Normally, you would have one
form and be able to select a product to view or edit. I really believe you
need to reconsider your design.

:

I must create many forms for each product from plants in my company.
Each product have daily many analysys. My database is linked to SharePoint
server.

„Klatuu“ wrote:

To my knowledge, there is no columnwidth property in any form. All controls
on forms have a width property
Me.txtLastName.Width = 2880
would set the control named txtLastName to 2"
Since each form is going to be specifc to the controls on the form, I don't
see how you can do this globally. 100 forms is a lot of forms. Is there any
reason you have so many?

:

I have about 100 forms in datasheet view...
How to put this code in module and call from form, in On Current event?

Me.[Column1].ColumnWidth = 1016
Me.[Column2].ColumnWidth = 780
Me.[Column3].ColumnWidth = 1950

Thanks!
 
I did not mean that plants and products should be in the same table, I meant
a table for plants and a table for products.
In most cases, there would be a third table that joins the two and shows
which plants make which products.

If you have to have a separate table for each plant. One way to limit to
one form would be to establish the record source of the form in the Load
event, based on which plant is going to be used.

Igor G. said:
Each plant have unique products/half-products (oil company). I have daily
more than 2000 enters in lab. Each plant store data in own table, and field
in table identifies product. This is too much data for just one table.
The way with combos and one table I make in second database for other
products.

„Klatuu“ said:
My point, exactly.

If your 22 plants work off the same table or query, then you could do it
with one form. Same for products.

Now if you tell my you have a separate table for each plant, your database
design needs correcting. All the plants should be in one table. You only
need a field in the table that identifies the plant. You can filter you form
on the plant you want to work with. The way that is usually done is with a
combo box that has a row source of the field in the plants table that
identifies the plant. When you select a plant from the combo, it will make
that plant the current record. The same holds true for products. If you set
up the link master/child property of the subform control, any time you select
a different plant, the subform will pull up the products related to that
plant.

Question - Does each plant have unique products or does every plant make
every product, or is a product made by some plants?

Igor G. said:
I have 22 "master form" (plants) with sub-forms (products) in Tab Control.
This works OK, but is very complicate to any global changes.
Thanks!

„Klatuu“ wrote:

I am not familiar with using Sharepoint, so I can't help you there.

Why does each product need a separate form? Normally, you would have one
form and be able to select a product to view or edit. I really believe you
need to reconsider your design.

:

I must create many forms for each product from plants in my company.
Each product have daily many analysys. My database is linked to SharePoint
server.

„Klatuu“ wrote:

To my knowledge, there is no columnwidth property in any form. All controls
on forms have a width property
Me.txtLastName.Width = 2880
would set the control named txtLastName to 2"
Since each form is going to be specifc to the controls on the form, I don't
see how you can do this globally. 100 forms is a lot of forms. Is there any
reason you have so many?

:

I have about 100 forms in datasheet view...
How to put this code in module and call from form, in On Current event?

Me.[Column1].ColumnWidth = 1016
Me.[Column2].ColumnWidth = 780
Me.[Column3].ColumnWidth = 1950

Thanks!
 
Back
Top