Re: for Lynn Trapp RE: two records for one relationship

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Lynn Trapp (ltrappNoSpam_at_ltcomputerdesigns.com)
Date: 06/10/04


Date: Thu, 10 Jun 2004 14:53:01 -0500

Yes, you need to change my code to reflect the correct names of your forms
and subform controls.

You should look at redesigning the whole thing after you get this part
working the way you want. You can probably reduce the number of tables and
simplify the way the thing works.

-- 
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
"JohnLute" <JohnLute@discussions.microsoft.com> wrote in message
news:9959207F-F694-477D-9B72-76E3BBCF645D@microsoft.com...
> Thanks, Lynn!!!
>
> I plugged in the code (and adjusted the names to match the recent changes
I've made) but I get a syntax error message. The debugger points to this:
> v_parent_id =
> Forms!frmprofiles.Form!sfrmProfilesAssociations!cbProfilesAssociations
>
> I think the problem lies in "frmProfiles". sfrmProfilesAssociations is
used for multiple forms. Does this mean the code needs to reflect those form
names? For example, if the sfrm is in frmPKCorrugated then should the code
read:
> v_parent_id =
> Forms!frmPKCorrugated.Form!sfrmProfilesAssociations!cbProfilesAssociations
>
> I think you're right. The multiplicity of my tables adds a twist to the
whole design. It forces the Parent to also be a Child of it's children.
Sounds like a horror novel from Stephen King!
>
> "Lynn Trapp" wrote:
>
> > John,
> > Here's the code again:
> >
> > Private Sub cboProfileAssociations_Change()
> > Dim v_parent_id As String
> > Dim v_child_id As String
> > Dim v_Str_SQL As String
> >
> > v_parent_id =
> > Forms!frmprofiles.Form!sfrmprofileassociations!cboProfileAssociations
> > v_child_id = Forms!frmprofiles!txtProfileID
> >
> > DoCmd.SetWarnings False
> > v_Str_SQL = "Insert Into tblProfileAssociations Values ("
> > v_Str_SQL = v_Str_SQL & v_child_id & "," & v_parent_id & ")"
> > DoCmd.RunSQL (v_Str_SQL)
> > DoCmd.SetWarnings True
> >
> > End Sub
> >
> > The more I look at what you are trying to do, it still looks like a
Standard
> > BOM to me but, due to the multiplicity of tables, is requiring you to do
the
> > odd thing of making a Parent also be a child of its children.
> >
> > Off hand I don't know of a BOM example anywhere. You could do a google
> > search on Bills Of Materials and perhaps that would return something.
Trying
> > to create a model for you would be one of those consulting things for
which
> > I get the "big bucks"....NOT.
> >
> > -- 
> > Lynn Trapp
> > MS Access MVP
> > www.ltcomputerdesigns.com
> > Access Security: www.ltcomputerdesigns.com/Security.htm
> >
> >
> > "JohnLute" <JohnLute@discussions.microsoft.com> wrote in message
> > news:72809D6E-AF45-41A5-B3D3-3F716E5A3CB8@microsoft.com...
> > > Hi, Lynn.
> > >
> > > This will be my 3rd attempt to post! This new board is giving me fits.
> > >
> > > Thanks for the code. Unfortunately, I was unable to get it before the
new
> > board apparently wiped it out. Would you please be so kind and post it
here
> > again?
> > >
> > > We had a meeting yesterday to review my design. The overall thought
was
> > that my sfrmProfilesAssociations was fine and that a BOM is not needed.
Of
> > course, the issue we have is with needing to physically enter both
records
> > as relating. I assured everyone that I have the code to rectify this.
> > >
> > > I'm not one to close any doors and your comments about BOM's has
intrigued
> > me. I'd like to explore this further. I've never seen a model. Would you
> > know of an example available online? Could you point me to some resource
> > that has a model example?
> > >
> > > About your comments regarding communication. I believe there's been
> > frustration at both ends. Communication is a two-way street and I happen
to
> > speak at a level of novice whereas you speak from a higher level of
> > professionalism. I think this gap in our levels has been the source of
our
> > miscues. I know there's a place in the middle where we can meet and I
really
> > appreciate your efforts to meet me there!
> >
> >
> >


Relevant Pages

  • Re: for Lynn Trapp RE: two records for one relationship
    ... The multiplicity of my tables adds a twist to the whole design. ... "Lynn Trapp" wrote: ... > Off hand I don't know of a BOM example anywhere. ... > speak at a level of novice whereas you speak from a higher level of ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Need help with Tables Design and Relationships
    ... "Tom" wrote in message ... > that running such "testing query" would determine whether or the ... > "Lynn Trapp" wrote in message ... >> MS Access MVP ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Distinct Query, on one field with return on multiple fields
    ... >>the Foreign Key the same as the Primary Key of the parent ... >>Lynn Trapp ... >>MS Access MVP ... >>> PrimaryKey 1 ...
    (microsoft.public.access.formscoding)
  • Re: Different Users for Access 2000
    ... Access Security: www.ltcomputerdesigns.com/Security.htm ... The database that I am going to create is going to be ... >Lynn Trapp ... >MS Access MVP ...
    (microsoft.public.access.security)
  • Re: Permissions problem
    ... Now if you can tell me how to change a database file named ... > "Lynn Trapp" wrote: ... >> username/password prompt. ... >> MS Access MVP ...
    (microsoft.public.access.security)