|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
change a record source
below is the code i am working with:
Public Sub Form_Open(Cancel As Integer) Dim strNewRecord As String strNewRecord = "SELECT tblTemp.user FROM tbltemp " _ If strNewRecord = "10" Then Me.RecordSource = "tblTemp" Else Me.RecordSource = "tbl" End Sub i want my record source to change to "tbl" if there are no records in the above query "strNewRecord = "SELECT tblTemp.user FROM tbltemp " can anyone show me code to do this, mine is wrong... |
|
#2
|
||||
|
||||
|
try
Code:
strNewRecord = "SELECT tblTemp.user FROM tbltemp " _ If(strNewRecord.eof) Then Me.RecordSource = "tblTemp" Else Me.RecordSource = "tbl" End If |
|
#3
|
|||
|
|||
|
it says invalid qualifier
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > change a record source |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|