Passing Problem

  • Thread starter AKalka via AccessMonster.com
  • Start date
A

AKalka via AccessMonster.com

I am still new to access so bare with me. I am working with 3 tables, with a
One (PT) To Few (Ot) to Many (TT) relationship. I have a one form called
"PTf" for the PT table only. Where the user selects what part they want from
the part table, Then clicks the Operation Button to go to the "OTf" form.
This is where i'm having trouble. If the the selected part has a operation it
show all the information. But if the part has no operation yet, all the
fields are blank. Here is my code,

strwhere = "[Part Id] IN (" & Me.Part_ID & ")"
DoCmd.OpenForm "OTF", acNormal, , strwhere, acFormEdit
 
D

Douglas J. Steele

If Len(Me.Part_ID & vbNullString) > 0 Then
strwhere = "[Part Id] IN (" & Me.Part_ID & ")"
DoCmd.OpenForm "OTF", acNormal, , strwhere, acFormEdit
Else
DoCmd.OpenForm "OTF", acNormal, , , acFormEdit
End If
 
A

AKalka via AccessMonster.com

its still showing empty fields. It show it binging a part Id but does not
input it in to any of the the part id field.
If Len(Me.Part_ID & vbNullString) > 0 Then
strwhere = "[Part Id] IN (" & Me.Part_ID & ")"
DoCmd.OpenForm "OTF", acNormal, , strwhere, acFormEdit
Else
DoCmd.OpenForm "OTF", acNormal, , , acFormEdit
End If
I am still new to access so bare with me. I am working with 3 tables, with
a
[quoted text clipped - 9 lines]
strwhere = "[Part Id] IN (" & Me.Part_ID & ")"
DoCmd.OpenForm "OTF", acNormal, , strwhere, acFormEdit
 
D

Douglas J. Steele

Sounds as though your query that joins the three tables isn't correct then.

In the query builder, select the lines that join the tables (one at a time)
and look at the three options that are presented. Presumably you've got the
top option in all cases: you'll have to play with the other two options
(sorry I can't be more explicity, but which option you pick will depend on
the order in which you joined the tables)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


AKalka via AccessMonster.com said:
its still showing empty fields. It show it binging a part Id but does not
input it in to any of the the part id field.
If Len(Me.Part_ID & vbNullString) > 0 Then
strwhere = "[Part Id] IN (" & Me.Part_ID & ")"
DoCmd.OpenForm "OTF", acNormal, , strwhere, acFormEdit
Else
DoCmd.OpenForm "OTF", acNormal, , , acFormEdit
End If
I am still new to access so bare with me. I am working with 3 tables,
with
a
[quoted text clipped - 9 lines]
strwhere = "[Part Id] IN (" & Me.Part_ID & ")"
DoCmd.OpenForm "OTF", acNormal, , strwhere, acFormEdit
 
A

AKalka via AccessMonster.com

is there a way to have it create a record for the ot table automaticly after
a user enters a new record on the pt table. like a record name blank that the
user can then edit.
Sounds as though your query that joins the three tables isn't correct then.

In the query builder, select the lines that join the tables (one at a time)
and look at the three options that are presented. Presumably you've got the
top option in all cases: you'll have to play with the other two options
(sorry I can't be more explicity, but which option you pick will depend on
the order in which you joined the tables)
its still showing empty fields. It show it binging a part Id but does not
input it in to any of the the part id field.
[quoted text clipped - 12 lines]
strwhere = "[Part Id] IN (" & Me.Part_ID & ")"
DoCmd.OpenForm "OTF", acNormal, , strwhere, acFormEdit
 
D

Douglas J. Steele

No, there isn't.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


AKalka via AccessMonster.com said:
is there a way to have it create a record for the ot table automaticly
after
a user enters a new record on the pt table. like a record name blank that
the
user can then edit.
Sounds as though your query that joins the three tables isn't correct
then.

In the query builder, select the lines that join the tables (one at a
time)
and look at the three options that are presented. Presumably you've got
the
top option in all cases: you'll have to play with the other two options
(sorry I can't be more explicity, but which option you pick will depend on
the order in which you joined the tables)
its still showing empty fields. It show it binging a part Id but does
not
input it in to any of the the part id field.
[quoted text clipped - 12 lines]
strwhere = "[Part Id] IN (" & Me.Part_ID & ")"
DoCmd.OpenForm "OTF", acNormal, , strwhere, acFormEdit
 

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