Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Completely blank form

Status
Not open for further replies.

Ravensleach

Programmer
Oct 19, 2004
45
PE
I created a small database which is on our internal server, in Access 2000. A colleague has Access 2007 with Vista OS and at first couldn't get into the database at all. I made her her own front end by using the original forms, importing the queries, modules, macros, etc and linking to the networked tables. Now the main form appears to be completely blank, but in Design View it is all there.

Filters, edits, deletions and additions are all permitted and the form is Dynaset Data entry.

The rest of us use Access 2002 and it works fine.

I think my next step is to recreate the form on her computer in Access 2007 but is there a quicker fix?

Thanks
 
You may want to check the connection to the back-end. Usually if nothing shows, it is not seeing any records.
Try relinking on your colleagues computer and if that does not work check your queries.
 
Thanks jkl0. I checked all that and all seems well, with the underlying query showing results, but the form is still a complete blank.

Maybe Access2007 uses a different code library for reference? I did make the db in Access 2000 so it must be due for a change. Here is the Visual Basic for the form:

___________________________________________________________

Code:
Option Compare Database
Option Explicit

'Replace txtClipboard with oficio2

Private Sub cmdCopy_Click()
On Error GoTo Err_cmdCopy_Click

    Dim fOK As Boolean
    Dim strTemp As String
    
    If IsNull(Me!Oficio2) Or Me!Oficio2 = "" Then
        MsgBox "Error: Could not write Null or empty string to Clipboard."
        Exit Sub
    Else
        strTemp = Me!Oficio2
        fOK = SetClipboardData_clt(strTemp)
    End If
    
    If Not fOK Then
        MsgBox "Error: Could not write to the Clipboard."
    Else
        MsgBox "The Text Box contents have been written to the Clipboard."
    End If
    
Exit_cmdCopy_Click:
    Exit Sub

Err_cmdCopy_Click:
    MsgBox Err.Description
    Resume Exit_cmdCopy_Click
    
End Sub

Function SetClipboardData_clt(strText As String) As Boolean
On Error GoTo err_SetClipboardData_clt
  ' Comments  : Writes the supplied string to the clipboard
  ' Parameters: strText - text to write
  ' Returns   : True if successful, False otherwise
  '
  Dim lngHoldMem As Long
  Dim lngGlobalMem As Long
  Dim lngClipMem As Long
  Dim lngTemp As Long
 
  lngHoldMem = clt_GlobalAlloc(&H42, Len(strText) + 1)
  lngGlobalMem = clt_GlobalLock(lngHoldMem)
  lngGlobalMem = clt_lstrCpy(lngGlobalMem, strText)
  If clt_GlobalUnlock(lngHoldMem) = 0 Then
    If clt_OpenClipboard(0&) <> 0 Then
        lngTemp = clt_EmptyClipBoard()
        lngClipMem = clt_SetClipboardData(1, lngHoldMem)
        lngTemp = clt_CloseClipboard()
    End If
  End If

  SetClipboardData_clt = True

exit_SetClipboardData_clt:
  Exit Function

err_SetClipboardData_clt:
  SetClipboardData_clt = False
  Resume exit_SetClipboardData_clt

End Function

Private Sub cmdClearTxtBox_Click()
On Error GoTo Err_cmdClearTxtBox_Click
    
    Me!Oficio2 = Null
    Me!lblClipboard.Caption = "The Text Box has been cleared."
            
Exit_cmdClearTxtBox_Click:
    Exit Sub

Err_cmdClearTxtBox_Click:
    MsgBox Err.Description
    Resume Exit_cmdClearTxtBox_Click
    
End Sub


Private Sub NuevaPersona_Click()
On Error GoTo Err_NuevaPersona_Click

    Dim stDocName As String

    stDocName = "openTable"
    DoCmd.RunMacro stDocName

Exit_NuevaPersona_Click:
    Exit Sub

Err_NuevaPersona_Click:
    MsgBox Err.Description
    Resume Exit_NuevaPersona_Click
    
End Sub
Private Sub VerTodos_Click()
On Error GoTo Err_VerTodos_Click

    Dim stDocName As String

    stDocName = "ViewAll"
    DoCmd.RunMacro stDocName

Exit_VerTodos_Click:
    Exit Sub

Err_VerTodos_Click:
    MsgBox Err.Description
    Resume Exit_VerTodos_Click
    
End Sub
Private Sub save_Click()
On Error GoTo Err_save_Click


    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Exit_save_Click:
    Exit Sub

Err_save_Click:
    MsgBox Err.Description
    Resume Exit_save_Click
    
End Sub

Private Sub Previous_years_Click()
On Error GoTo Err_Previous_years_Click

    Dim stDocName As String

    stDocName = "ViewOld"
    DoCmd.RunMacro stDocName

Exit_Previous_years_Click:
    Exit Sub

Err_Previous_years_Click:
    MsgBox Err.Description
    Resume Exit_Previous_years_Click
    
End Sub
Private Sub Command19_Click()
On Error GoTo Err_Command19_Click


Me.Oficio2.SetFocus
DoCmd.RunCommand acCmdCopy
Exit_Command19_Click:
    Exit Sub

Err_Command19_Click:
    MsgBox Err.Description
    Resume Exit_Command19_Click
    
End Sub
Private Sub cmd_GoToAppendOldYear_Click()
On Error GoTo Err_cmd_GoToAppendOldYear_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frm_AppendOldYear"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmd_GoToAppendOldYear_Click:
    Exit Sub

Err_cmd_GoToAppendOldYear_Click:
    MsgBox Err.Description
    Resume Exit_cmd_GoToAppendOldYear_Click
    
End Sub
Private Sub nuevacarta_Click()
On Error GoTo Err_nuevacarta_Click


    DoCmd.GoToRecord , , acNewRec

Exit_nuevacarta_Click:
    Exit Sub

Err_nuevacarta_Click:
    MsgBox Err.Description
    Resume Exit_nuevacarta_Click
    
End Sub
Private Sub exit_Click()
On Error GoTo Err_exit_Click

    Dim stDocName As String

    stDocName = "quit"
    DoCmd.RunMacro stDocName

Exit_exit_Click:
    Exit Sub

Err_exit_Click:
    MsgBox Err.Description
    Resume Exit_exit_Click
    
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top