help with linking form ID's (1 Viewer)

munkeyroot

Registered User.
Local time
Today, 19:02
Joined
Jan 13, 2011
Messages
76
hi everyone,

i am having issues with a form not seeing or linking to my main form.

on my main form i have a button that opens a new parts form (which is based on a query from a table). when i open the new parts form the ID of the main form is not displayed - even though i have a relationship with the mainform ID and the ID on the new parts.

i have set the button on the main form to

Private Sub BtnNewparts_Click()
DoCmd.OpenForm "frmNewParts", , , "[ID]=" & Me.ID

End Sub

i may have this completely wrong :)
hope you can help
Munk
 

Ranman256

Well-known member
Local time
Today, 14:02
Joined
Apr 9, 2015
Messages
4,337
Is the textbox on the main form actually named 'ID'?
Is the newForm set to DATAENTRY? It won't load ID if in entry mode.
 

munkeyroot

Registered User.
Local time
Today, 19:02
Joined
Jan 13, 2011
Messages
76
Hi Ranman

yes the Text box is called ID on the main for and on the Newparts form.

ok mate i'll check the form too

cheers munk
 

munkeyroot

Registered User.
Local time
Today, 19:02
Joined
Jan 13, 2011
Messages
76
ok so i checked the form and data entry was set to no, ive set it to yes, tested, still no joy.
The newparts form only displays a 0, though if i look at the newparts form props:data tab on the filter it shows [ID]=75 the number changes which ever form i open the new parts form on. Then i go to design view - so if i open main form ID 1 and open the new parts form and then go to the design view here.

really odd.
 

munkeyroot

Registered User.
Local time
Today, 19:02
Joined
Jan 13, 2011
Messages
76
Hi Ranman
thanks bud for your help managed to get this one sorted. the child and master links were all screwed up.

cheers bud

munk
 

Users who are viewing this thread

Top Bottom