krazykaigh
Registered User.
- Local time
- Today, 00:05
- Joined
- Apr 10, 2012
- Messages
- 11
Hi all,
I have a subform (sbfm_One let's say) that has a subform on it (sbfm_One_A let's say) that will only be visible if you check a checkbox on the first sbfrm_One.
Now when exiting the control for sbfm_One, if the checkbox is checked and nothing was entered on sbfm_One_A, that's a no no, and sbfm_One_A should become not visible, and the checkbox should return to unchecked, indicating there is no sub data.
Now, the two subforms are related and sbfm_One has a one to many relate with sbfm_One_A.
So on exit, I have to determine if there are any related records in sbfm_One_A if the checkbox is checked. I am trying not to use a query but just a dlookup.
My problem comes when using the Where part and I am trying to get the value of the PK of the underlying table for sbfm_One.
Can someone tell me how to access a table value directly, like:
Dim intNumber as Integer
intNumber = tbl_sbfm_One.["PrimeKey"].value
This way I can use intNumber to see if any records exist in sbfm_One_A's underlying table.
Can the table be directly accessed or do I have to add a field to my form and get the value from that?
Thanks
I have a subform (sbfm_One let's say) that has a subform on it (sbfm_One_A let's say) that will only be visible if you check a checkbox on the first sbfrm_One.
Now when exiting the control for sbfm_One, if the checkbox is checked and nothing was entered on sbfm_One_A, that's a no no, and sbfm_One_A should become not visible, and the checkbox should return to unchecked, indicating there is no sub data.
Now, the two subforms are related and sbfm_One has a one to many relate with sbfm_One_A.
So on exit, I have to determine if there are any related records in sbfm_One_A if the checkbox is checked. I am trying not to use a query but just a dlookup.
My problem comes when using the Where part and I am trying to get the value of the PK of the underlying table for sbfm_One.
Can someone tell me how to access a table value directly, like:
Dim intNumber as Integer
intNumber = tbl_sbfm_One.["PrimeKey"].value
This way I can use intNumber to see if any records exist in sbfm_One_A's underlying table.
Can the table be directly accessed or do I have to add a field to my form and get the value from that?
Thanks