link child/master fields

disgruntled

Registered User.
Local time
Today, 15:00
Joined
Jul 3, 2001
Messages
38
I posted a question earlier because I was only getting ALL of records with the first occurance of BV in the criteria. I am now thinking the SQL is not the problem at all. This is the snippet where I update a subform and my problem lies in the lines:

Me.sfrmForm.LinkChildFields = "PARENT_ID;VEGETATION_CODE;BV"
Me.sfrmForm.LinkMasterFields = "PARENT_ID;VEGETATION_CODE;BV"

What do i set these values to if i want all the values with BV greater than 12???????

Dim QRY As String
QRY = "SELECT [PARENT_ID],[VEGETATION_CODE],[SEED_PLAN_UNIT_ID], [SEED_PLAN_UNIT_2], [SEED_PLAN_ZONE_CODE], [BV_STATUS_CODE],[STATUS_CHANGE], [BV_TRAIT_CODE], [BV], [RANK], [DATE_CREATED]"
QRY = QRY & " FROM tblMain_BV GROUP BY [PARENT_ID],[VEGETATION_CODE],[SEED_PLAN_UNIT_ID],[SEED_PLAN_UNIT_2],[SEED_PLAN_ZONE_CODE],[BV_STATU
S_CODE],[STATUS_CHANGE],[BV_TRAIT_CODE],[BV],[RANK],[DATE_CREATED]"
QRY = QRY & " HAVING [BV] >= 12;"

Me.sfrmForm.LinkChildFields = ""
Me.sfrmForm.LinkMasterFields = ""

Me.RecordSource = QRY

Me.sfrmForm.LinkChildFields = "PARENT_ID;VEGETATION_CODE;BV"
Me.sfrmForm.LinkMasterFields = "PARENT_ID;VEGETATION_CODE;BV"
Me.Requery
 
if anyone was interested........linking masterfields have to be a static value. So in this case where I had a range of value's it could only recognize the first one.
 

Users who are viewing this thread

Back
Top Bottom