Forms & Sub Forms

G

Guest

Is this possible?

On main form, have a subform setup in datasheet view. When you click on a
record, like a trouble ticket, it then displays the corresponding record.
From what I gather, you would need like two tables with a relationship
between them.

But I get the feeling you can't as you must make that second form a subform
of the first (main, sub and then the sub has a sub), which the second sub
can't be setup as datasheet view & have a subform in form view.

Right?

Thanks
Curtis
 
G

Guest

Hi Curtis

You could use a Main Form and have a number of tabed subforms


--
Wayne
Manchester, England.
Enjoy whatever it is you do
Scusate,ma il mio Inglese fa schiffo :)
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.
 
G

Guest

Does this fix my problem? Not sure if I'm explaining it very well.

When you have a form, you have to scroll through the form or hit the next
record button to be able to view all the records. What I want to have is
pull up a form, it list all the records in continuous form view or datasheet.
I can then simply click on one of them and it will display the data below.
Instead of having to scroll through all the records in a form, you can see an
over view in a list and then click on one to see the details, edit it, etc.
 
G

Guest

Hi Curtis

I am sorry but I am not sure what your question is (what is a pull up form)

The JPEG you showed simply show a standard form Main and sub - the only
difference I can see from "normal" layout is the the "mainform" datasheet is
lower down on the screen than the "subform".

The main form has will have a primary field (may be called ID) and this
field will be linked to the table the holds the data for the subform.

Can you explain in simply english what you are trying to do.


--
Wayne
Manchester, England.
Enjoy whatever it is you do
Scusate,ma il mio Inglese fa schiffo :)
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.
 
G

Guest

Referring to my visual aid. Lets take the first record in the blue box, dated
7/20/06 with a subject of previewed this application.

Now, when you click on that record with your mouse, it then displays the
data for that record in the boxes above it. Meaning that records data that
you just clicked on will show up in the boxes above name date, author, type
ticket # and the two bigger field boxes with no labels.

Am I making sense now?
 
G

Guest

Hi Curtis

Sorry for takeing so long to get back to you

I ahve been trying to get the ting to work. The probem is is that you can
not have a subform on a datasheet form so I have been try to make a main form
with only the ID field and link 2 sub forms (one datasheet as you want and
one single form to show the details of the selected item on the datasheet).

I have to go out now but I will get back to it in the moring - hope thats
OK. It should be a problem.

So if no one else answers tonight I will get it to work (some how) in the
morning.


--
Wayne
Manchester, England.
Enjoy whatever it is you do
Scusate,ma il mio Inglese fa schiffo :)
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.
 
T

tina

the following setup may work for you:

the mainform and the subform are both bound to TableA (whatever your table
name is).
the mainform is in SingleForm view and the subform is in Datasheet view.
in the subform control within the main form's Design view, make sure that
the LinkChildFields and LinkMasterFields properties are *blank*, so that the
two forms are NOT automatically linked.
set the subform's RecordsetType property to Snapshot, so the records can't
be edited in the subform, only in the main form.
in the *subform's* VBA module, add the following code to the Current event
procedure, as

Private Sub Form_Current()

Me.Parent.Recordset.FindFirst "PKField = " & Me!PKField

End Sub

replace PKField with the correct name of the primary key field in TableA, of
course. the above code assumes that the primary key field is a Number data
type. if it's Text instead, change the syntax to

Me.Parent.Recordset.FindFirst "PKField = '" & Me!PKField & "'"

and that's it. to move to any record in the main form, just move to that
record in the subform - either by clicking in a record or using the Tab
and/or Arrow keys.

note that if you edit data in a record in the main form, you may have to
requery the subform to see the changes reflected there. if you add or delete
a record in the main form, you'll definitely have to requery the subform.
and when you requery, the focus will move to the first record on the
subform, and therefore to the first record on the mainform as well.

hth
 
G

Guest

Cool, I got that to work. Only problem is I don't think this will work the
way I have my forms setup, got a lot off stuff.

Visual aid of my form:

http://www.gotmerchant.com/shot1.gif
http://www.gotmerchant.com/shot2.gif

Looking at Shot 2, what I would like, is the tickets or records (the main
form in that tab "call data", list dept, subject, priority etc. Have that in
continuous form and when you click on one, it will show the details (the
notes attached to that record) in my note box below. However, that form in
the call data tab is all run on a query based on the current record in my
whole main form. The main form is all in a tab control with different
versions, all ran by querys, like potential customers, current ones, the
whole list (all), etc.

Thanks
Curtis
 
T

tina

well, do you only *think* it won't work, or did you actually try to
incorporate it into your form? if so, what did you do and what was the
result? and how, specifically, is your setup different from what you
described in previous posts in this thread?

hth
 
G

Guest

Hi Tina, I gave it a try and it kept saying "customerID" isn't something. I
tried a few other pkfields and nothing. I tried a number of things and got
the feeling what I'm trying to do is backwards and probably isn't possible.
Look how many forms and sub of sub of subforms I have. I have two tab
controls, which one is a sub of another....
 
G

Guest

I get it to work when I have the form open up byitself and not open my big
main form. But that note box, there could be multiple records for each
record from the sub form, which it looks like that wont work as it isn't
working when I open up the form individually. I can click on one and it
shows the details in the note box, but also shows every other one in that
table as well....
 
T

tina

well, in these newsgroups a suggested solution is rarely better than the
posted information that it was based on, hon. good luck with your project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top