C
Claudette Hennessy
I have a continuous form based on an outer join. The pertinent fields in
the query are
SELECT tblDealer.ShopID, tblDealer.ShopName,
IIf(IsNull(tblContract2008Temp.ShopName),tblDealer.ShopName,tblContract2008Temp.ShopName)
AS FindShopName, FROM tblDealer LEFT JOIN tblContract2008Temp ON
tblDealer.ShopID = tblContract2008Temp.ShopID
ORDER BY tblDealer.ShopName;
I have a hidden control set to the FindShopName value.
When the form opens, if any txtShopName value is null, I want it set to the
FindShopName value. What happens is the form opens with the control still
blank, but it fills in if I click the control or the record selector.
What am I missing. I also tried the on Current, and on load events.
Private Sub Form_Open(Cancel As Integer)
With Me
If IsNull(.[txtShopName]) Then
..[txtShopName] = .[txttblDealerShopName]
End If
End With
End Sub
Thank you,
Claudette
the query are
SELECT tblDealer.ShopID, tblDealer.ShopName,
IIf(IsNull(tblContract2008Temp.ShopName),tblDealer.ShopName,tblContract2008Temp.ShopName)
AS FindShopName, FROM tblDealer LEFT JOIN tblContract2008Temp ON
tblDealer.ShopID = tblContract2008Temp.ShopID
ORDER BY tblDealer.ShopName;
I have a hidden control set to the FindShopName value.
When the form opens, if any txtShopName value is null, I want it set to the
FindShopName value. What happens is the form opens with the control still
blank, but it fills in if I click the control or the record selector.
What am I missing. I also tried the on Current, and on load events.
Private Sub Form_Open(Cancel As Integer)
With Me
If IsNull(.[txtShopName]) Then
..[txtShopName] = .[txttblDealerShopName]
End If
End With
End Sub
Thank you,
Claudette