Ah, I am beginning to understand... as John says, Access is not Filemaker
and Filemaker is not Access... so describing what you want to accomplish in
terms of how you would do it in Filemaker is a self-defeating. If you
describe what you want to accomplish in terms of what you want to see /
happen may allow us to give you guidance on "how-to" do it in Access.
A phrase I've never used in discussing Access since it was introduced in
1993 is "code GTTR", but, if I understand what you want to happen, John's
already told you that you can do it, with no code, using Access' Subform
Control into which you can embed a Form. It's nothing special for the Form
in the Subform to display a matching record if one exists or allow creating
one if none exists. And, the Subform Control (and the Form displayed within)
will "go away" when the parent Form is closed.
But a Subform Control exists within a parent Form... if you are opening a
separate Form, as is likely if you want it to fill the screen, that is not
(repeat NOT) a Subform.
--
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access
John:
No disrespect meant to either app -- they both have their strengths &
flaws.
As far as creating a subform:
Both the main form and subform contain A LOT of data, and need to be
full screen.
Again, I'd like to GTRR when PK = fk
If no fk in Form 2, then create a new record there and pass the PK
from Form 1
Thanks Again!
Amy
===
I'm used to FileMaker, where it's very easy to script GTTR; if there
is none, then create it, and pass the PK.
What would be the VBA equivalent?
Open Form where fk = PK on another form
IF [fk] Is Null, Then
Create new record in form and
Pass PK in Form 1 to fk.
Access is not a flawed implementation of FileMaker.
Both Access and FileMaker are very capable database programs, BUT THEY ARE
DIFFERENT. Trying to use Filemaker syntax in an Access database will be a
guaranteed source of frustration (I can say that the opposite is true as
well,
from personal painful experience!)
The Access solution would use no script and no code at all; you would
simply
make the second form a Subform of the first, using the PK as the Master
Link
Field and the fk as the Child Link Field.
--
John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see alsohttp://
www.utteraccess.com- Hide quoted text -
- Show quoted text -