hello, I'm trying to code a form that will output all data on from one
table into separate pages (can scroll through them using the arrows, or
entering a specific entry at the bottom), but on each page it will look
at the primary key for that table, then look at another table, and
wherever it contains a reference to that particular value, create a
textbox and output a memo onto...
since that was probably vague and confusing i will try to explain it
again with examples... I have a table called "Hazard table", it has
fields for "JSA Number", "Job Component Number", "Hazard Number"
<--(primary key), and "Hazard Description". I have another table called
"Control Measure Table", it has fields for "JSA Number", "Job Component
Number", "Hazard Number" <--(refers to "Hazard number" in "Hazard
table"), "Control Measure Number" <--(primary key), and "Control
Measure Description".
now what I want the form to do, is for each "Hazard Number" in "Hazard
Table" output the description for it, and output any description from
the "Control Measure table" that has a matching "Hazard Number"... I
would like it to display such that it creates a TextBox and displays
the descriptions for each hazard description (with a button at the
bottom to create a new hazard) so that the data can be edited, and then
create TextBoxes to the right of the hazard description, one for each
control desciption (again, with a button at the bottom to create a new
control measure)
the primary keys for both tables are set up as autonumbers, and the
hazard number in the control measure table is supposed to be given the
value of the hazard number its being created with...
currently my chief trouble is figuring out how to access the two tables
and use the relation between the two within the form itself... then i
still havent quite figured out how to have it create the textboxes it
needs as its goes (i dont want to have a bunch of textboxes not visible
or anything like that)... I'm not that good with VB, your help would
be appreciated... thanks in advance, and sorry that my post is long and
a bit hard to read
table into separate pages (can scroll through them using the arrows, or
entering a specific entry at the bottom), but on each page it will look
at the primary key for that table, then look at another table, and
wherever it contains a reference to that particular value, create a
textbox and output a memo onto...
since that was probably vague and confusing i will try to explain it
again with examples... I have a table called "Hazard table", it has
fields for "JSA Number", "Job Component Number", "Hazard Number"
<--(primary key), and "Hazard Description". I have another table called
"Control Measure Table", it has fields for "JSA Number", "Job Component
Number", "Hazard Number" <--(refers to "Hazard number" in "Hazard
table"), "Control Measure Number" <--(primary key), and "Control
Measure Description".
now what I want the form to do, is for each "Hazard Number" in "Hazard
Table" output the description for it, and output any description from
the "Control Measure table" that has a matching "Hazard Number"... I
would like it to display such that it creates a TextBox and displays
the descriptions for each hazard description (with a button at the
bottom to create a new hazard) so that the data can be edited, and then
create TextBoxes to the right of the hazard description, one for each
control desciption (again, with a button at the bottom to create a new
control measure)
the primary keys for both tables are set up as autonumbers, and the
hazard number in the control measure table is supposed to be given the
value of the hazard number its being created with...
currently my chief trouble is figuring out how to access the two tables
and use the relation between the two within the form itself... then i
still havent quite figured out how to have it create the textboxes it
needs as its goes (i dont want to have a bunch of textboxes not visible
or anything like that)... I'm not that good with VB, your help would
be appreciated... thanks in advance, and sorry that my post is long and
a bit hard to read
Comment