Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating a join table/form.

Status
Not open for further replies.

Telsa

Programmer
Jun 20, 2000
393
US
I'm trying to have a field in a popup form automatically populate with data from an underlying form's field once the popup form is opened.

I have it working on one other set of forms, but for some reason, this one doesn't want to do it.

This is the code...

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmLocsJoin"
stLinkCriteria = "[Component]=" & "'" & Me![CD5x5] & "'"
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria, , , Me.CD5x5


I have run debug.print to see if the data is being seen and it is. The filter field in the properties of the popup form points to the right information. yet the form (a datasheet form) will not have the value populate the one field (Component).

What is weird it is that it works on another set of forms I did. I compared all the properties and settings and they match.

Anyone have any clues???
 
Hi Telsa,

DoCmd.OpenForm "frmLocsJoin", acFormDS, , "[Component]= " & Me![CD5x5]

Should do it...if not:

DoCmd.OpenForm "frmLocsJoin", acFormDS, , "[Component]= '" & Me![CD5x5] & "'"

:) Gord
ghubbell@total.net
 
Nope, didn't work. I'm thinking about rebuilding the buttons and code. Got a feeling there is a corruption I can't see in the IDE.
 
Try a simple open form... then another fixed open form...x=2 and if that won't go, make a fresh Db, import everything and try again? X-) Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top