I am not clear on what you want here. The OpenForm method
opens the form, but you said there is something wrong.
Unfortunately, you haven't explained what is going wrong.
Aren't you seeing the form? You said something about it
working if there is an existing record, is the problem that
you don't want it to display a blank, new record ready for
data when there is no existing record? Or is it that you
want in some fields the new record to be created
automatically?
What are you doing to make it work when there is an existing
record? I would think that the same things would work for a
new record as well as on a new record, except for possibly
setting a foreign key, but I don't see how that can be the
problem when you can go into the table directly and enter
data into any field to make it work. Maybe you have set the
form's AllowAdditions property to No so it can not add any
new records???
Try to slow down a little and provide the details we need to
understand what you're trying to do along with how you've
attempted to do it. Remember that programming is an
extremely exacting science that requires specific details to
do correctly.
I'm really sorry Marshall....I know I go too fast for everyone IRL but didn't
know I could transfer that capacity to text!!!
> I am not clear on what you want here. The OpenForm method
> opens the form, but you said there is something wrong.
> Unfortunately, you haven't explained what is going wrong.
> Aren't you seeing the form?
I can see the form.
You said something about it
> working if there is an existing record, is the problem that
> you don't want it to display a blank, new record ready for
> data when there is no existing record?
I don't want it to display a blank new record, I need it to open with the
existing record I am working on in another form.
Or is it that you
> want in some fields the new record to be created
> automatically?
I only said this because I thought it may help. it seems as if when there
is a value in another field already with something in it that the form will
open and be at the record I want.
> What are you doing to make it work when there is an existing
> record?
I go into the underlying table at the moment and put an x or a 1 or whatever
(just a character) into the Comments field.
I would think that the same things would work for a
> new record as well as on a new record, except for possibly
> setting a foreign key, but I don't see how that can be the
> problem when you can go into the table directly and enter
> data into any field to make it work. Maybe you have set the
> form's AllowAdditions property to No so it can not add any
> new records???
I will check this because I don't really know about the AllowAdditions
property.
This is the SQL code for the query that the form is based on:
SELECT tblContacts.pkCRDNumber, tblClaims.pkClaimID, tblContacts.Postcode,
tblContacts.Warehouse, tblContacts.Product, tblClaims.ReplacementOrder,
tblClaims.ReplacementReference, tblClaims.Collect,
tblReturns.KendalReturnDate, tblReturns.Comments,
tblReturns.ExpectedCollectionDate, tblReturns.PriorityCollection,
tblReturns.CollectAndReplace
FROM tblContacts INNER JOIN (tblClaims INNER JOIN tblReturns ON
tblClaims.pkClaimID = tblReturns.ClaimID) ON tblContacts.pkCRDNumber =
tblClaims.CRDNumber;
The current record exists in tblContacts and in tblClaims (joined one to
many on CRDNumber) however.....it does not yet exist in tblReturns, so I
currently create the record. Close my original form with subform
(frmFollow), go into tblReturns, enter a character somewhere, go back into
frmFollow, press my button on the subform and the correct record shows.
I want it to be able to do this but without obviously having to go into
tblReturns and enter a character.
Thank you....I really appreciate your help.
Cindy
> Try to slow down a little and provide the details we need to
> understand what you're trying to do along with how you've
[quoted text clipped - 34 lines]
> >> > Resume Exit_cmdCollect_Click
> >> >End Sub
Marshall Barton - 18 Nov 2005 14:56 GMT
>I'm really sorry Marshall....I know I go too fast for everyone IRL but didn't
>know I could transfer that capacity to text!!!
[quoted text clipped - 59 lines]
>I want it to be able to do this but without obviously having to go into
>tblReturns and enter a character.
Ok, that really helps. I guess part of my confusion is that
we keep saying "the form" when there are two (or three?)
forms being discussed. In the future, let's refer to a form
as "the collections form" or "the contacts form". I think
there is also a claims subform on the contacts form.
Is the query you posted above the record source for the
contacts form or the collections form?
I don't see how the query could possibly be the collections
form's record source because it does not include the primary
key field in tblReturns.
On the other hand, I don't see how it could work for the
contacts form either. Because of the INNER JOINs, if there
is no existing record in tblReturns (or tblClaims), the form
will not see the contacts record you want. If this is the
problem we are struggling with, then change the INNER JOINs
to LEFT JOINs. However, I don't see why the contacts form
should be retrieving data from the the other two tables, so
it's more likely that the Joins and extraneous fields should
just be removed from the query.

Signature
Marsh
MVP [MS Access]