97 Caption filter code not working in 2003

BarryMK

4 strings are enough
Local time
Today, 11:09
Joined
Oct 15, 2002
Messages
1,350
I've just converted the front end of my dog stray database from 97 to 2003. Everything looks the same so far but the following code that sets the form caption opening on a filter from command buttons on my switchboard no longer works. Instead of text showing in the caption, I get one of those irritating blank squares for each letter. Anyone else had this problem?

Command button code from Switchboard
Code:
'CURRENT SEIZED DOGS
Private Sub cmdCurrentSeized_Click()
On Error GoTo Err_cmdCurrentSeized_Click
    Dim stDocName As String
 
    stDocName = "frmAllStrayDetails"
    DoCmd.SetWarnings (False)

DoCmd.Close acForm, "frmAdminSwitchboard"
      DoCmd.OpenForm stDocName
[COLOR="red"]           DoCmd.ApplyFilter , "Not IsNull(StrayRef) And Closed = No"[/COLOR]

Forms![frmAllStrayDetails]![Pix].SetFocus

    DoCmd.SetWarnings (True)

Exit_cmdCurrentSeized_Click:
    Exit Sub

Err_cmdCurrentSeized_Click:
    MsgBox Err.Description
    Resume Exit_cmdCurrentSeized_Click
    
End Sub

On Current event on data form
Code:
Select Case Me.Filter

[COLOR="Red"]Case "Not IsNull(StrayRef) And Closed = NO"[/COLOR]
Me.Caption = "Current seized dogs"

End Select
 
Problem solved - sort of... Thanks Microsoft

I created a test db in 2003 with the failing code and it works fine. The problem was corruption caused by using the convert database command. I've tried converting to 2000 first and that has the same effect. The only recourse is to redo the forms which are the most complex I've ever built. P****ed off is putting it mildly.:mad:
 
Have you tried importing instead of converting. Create an empty db in 2003 and then import all your forms/queries/reports.
 
Have you tried importing instead of converting. Create an empty db in 2003 and then import all your forms/queries/reports.

No I'll definitely try that Dennis.
 
No dice!

I wasn't sure you could copy from 97 to 2003 .

I was able to copy over the queries but not the forms or modules. I tried both drag and drop and copy/paste as well as import but the objects would not transfer and I got a report a problem dialog when I closed the db.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom