How to know the form whether bound to a recordset at runtime

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

Ken says Me.Recordsource is a string, Mike says it's a variant!

So do it like this, then it does not matter either way:

if nz (me.recordsource, "") = "" then msgbox "no recordsource"

HTH,
TC
 
Hi,

I am use Access 2000 and winXP pro. I try to use IsNull(Me.RecordSet) to
check wether the form is bound to a recordset or not. But it always return
False. Could anyone tell me how can I know the form is bound to a recordset
at runtime?

Cheers,

Tao
 
Check the RecordSource property. If it's equal to an empty string, then the
form is unbound:

If Me.RecordSource = "" Then
' form is unbound
Else
' form is bound
End If
 
Ken says Me.Recordsource is a string, Mike says it's a variant!

It is a string.
 
Back
Top