need help with form/subform

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

Guest

Hi,
Can someone please help me (give me some pointers) to achieve the
following?


I have 1) a query that returns all records with "False" on a field
(completed) in table "A". 2) a form that is built based on the query. 3) a
form that shows all the fields in table "A".
This is what I am trying to do:
From a single form, shows the result based on query1, when the user click
on a record, shows the detail of the record in the subform (for user to
modify)


Thanks,

Jeff
 
Jeff said:
Hi,
Can someone please help me (give me some pointers) to achieve the
following?


I have 1) a query that returns all records with "False" on a field
(completed) in table "A". 2) a form that is built based on the query. 3) a
form that shows all the fields in table "A".
This is what I am trying to do:
From a single form, shows the result based on query1, when the user click
on a record, shows the detail of the record in the subform (for user to
modify)


Thanks,

Jeff

You will need a main form. Let's call it frmMain. On frmMain, you will
need 2 subform controls. The first subform control (we'll call it subList)
contains a continuous form or a form in datasheet view (frmList) which shows
the list of records bound to your query1. The second subform control (let's
call it subDetail) contains a form (frmDetail) which shows the details of 1
record.

Also, on frmMain, you need a hidden textbox (i.e. Visible property = No).
Let's call it txtLink. For subDetail, Link Child Fields should be the
primary key field for the record, whatever that is (let's suppose it's
called "pkey", and that it's an integer), and Link Master Fields should be
txtLink. subList shouldn't be linked at all.

Now, here's the final bit. For the Current event in frmList, you want the
event procedure to be like this:

Private Sub Form_Current()

Me.Parent.txtLink = [pkey]

End Sub
 
thank you

Brian said:
Jeff said:
Hi,
Can someone please help me (give me some pointers) to achieve the
following?


I have 1) a query that returns all records with "False" on a field
(completed) in table "A". 2) a form that is built based on the query. 3) a
form that shows all the fields in table "A".
This is what I am trying to do:
From a single form, shows the result based on query1, when the user click
on a record, shows the detail of the record in the subform (for user to
modify)


Thanks,

Jeff

You will need a main form. Let's call it frmMain. On frmMain, you will
need 2 subform controls. The first subform control (we'll call it subList)
contains a continuous form or a form in datasheet view (frmList) which shows
the list of records bound to your query1. The second subform control (let's
call it subDetail) contains a form (frmDetail) which shows the details of 1
record.

Also, on frmMain, you need a hidden textbox (i.e. Visible property = No).
Let's call it txtLink. For subDetail, Link Child Fields should be the
primary key field for the record, whatever that is (let's suppose it's
called "pkey", and that it's an integer), and Link Master Fields should be
txtLink. subList shouldn't be linked at all.

Now, here's the final bit. For the Current event in frmList, you want the
event procedure to be like this:

Private Sub Form_Current()

Me.Parent.txtLink = [pkey]

End Sub
 
Back
Top