none
Using a DB in 2010 created in 2007- missing functions

    Question

  • Is there any difference in DB function I it was created on aces 2007 but ran in 2010? I created a DB in 2007 but when I run it in 2010 some functions don't work properly or there somethig missing but works fine in 2007... Thoughts?
    Saturday, November 24, 2012 12:59 AM

Answers

All replies

  • Please give us some specific problems/error messages you experienced.

    In general, besides some minor changes, e.g. no Calendar Control since the Calendar is inbuilt into the TextBox Control, a database in Access 2007 format should work fine in Access 2010.


    Van Dinh

    Saturday, November 24, 2012 8:17 AM
  • Check if you have any missing references: code window > tools > references.

    -Tom. Microsoft Access MVP

    Saturday, November 24, 2012 3:05 PM
  • Event procedure
    Private Sub cmdNew_Click()
        If IsDebugMode = 0 Then On Error GoTo cmdNew_Click_Error
    
        'Openargs EntityIDToLoadOnDetailForm (0 if new record)
        DoCmd.OpenForm "frm" & Entity, , , , acFormAdd, acDialog, "0"
        DoCmd.Requery ""
        DoCmd.SearchForRecord , "", acFirst, "[" & Entity & "ID]=" & Nz(DMax("[" & Entity & "ID]", Me.RecordSource), 0)
    
    cmdNew_Click_Exit:
        Exit Sub
    
    cmdNew_Click_Error:
        Call ErrorLog(Err.Description, Err.Number, Me.Name, Erl, "cmdNew_Click")
        Resume cmdNew_Click_Exit
    End Sub

    Please give us some specific problems/error messages you experienced.

    In general, besides some minor changes, e.g. no Calendar Control since the Calendar is inbuilt into the TextBox Control, a database in Access 2007 format should work fine in Access 2010.


    Van Dinh

    The main problem is adding a new record in one of the sections of the DB.

    There is one section called "Buildings", it lists all buildings and the user selects which record to open. On the buildings form there is a tab called "Units", it will list current records of units that have been entered for that specific building. There is a control source: Control source: =IIf(IsNull([UnitID]),"(New)","Open")- works fine in 2007 but does not work in 2010. This is where the problem is, in 2007 the user can click on the blank cell which opens "New" unit; in 2010 this function is missing, as if it did not exist.  the event procedure associated is as follows

    Event procedure 
    Private Sub txtOpen_Click()
        Dim currentid As Long
        Dim strFilter As String
    
        If IsDebugMode = 0 Then On Error GoTo txtOpen_Click_Error
    
        If (Me.Form.Dirty) Then
            DoCmd.RunCommand acCmdSaveRecord
        End If
    
        'If clicked on new record, use code on Add New button instead
        If IsNull(Me.Controls(Entity & "ID")) Then
            Call cmdNew_Click
            Exit Sub
        End If
    
        'If list form filtered, filter detail form to match
        'Openargs EntityIDToLoadOnDetailForm|FieldNameToPopulate1~ValueToPopulate1~FieldNameToPopulate2~ValueToPopulate2, etc
        If Me.FilterOn = True Then
            strFilter = Me.Filter
            DoCmd.OpenForm "frm" & Entity, , , Me.Filter, acFormEdit, acDialog, Nz(Me.Controls(Entity & "ID"), 0) & "|||" & Me.Name
        Else
            DoCmd.OpenForm "frm" & Entity, , , , acFormEdit, acDialog, Nz(Me.Controls(Entity & "ID"), 0) & "|||" & Me.Name
        End If
    
        If (Not IsNull(Me.Controls(Entity & "ID"))) Then
            currentid = Me.Controls(Entity & "ID")
        Else
            currentid = Nz(DMax("[" & Entity & "ID]", Me.RecordSource), 0)
        End If
        DoCmd.Requery ""
        DoCmd.SearchForRecord acForm, Me.Name, acFirst, "[" & Entity & "ID]=" & CStr(currentid)
    
    txtOpen_Click_Exit:
        Exit Sub
    
    txtOpen_Click_Error:
        Call ErrorLog(Err.Description, Err.Number, Me.Name, Erl, "txtOpen_Click")
        Resume txtOpen_Click_Exit
    End Sub

    Unit page contains a button "New Unit", when it's clicked it opens a new blank form to enter data, in 2010 it opens an already present record. Event procedure associated with this button:

    Also in 2010, Reports text changed to grey from black and a grey background appears.

    Saturday, November 24, 2012 6:47 PM
  • It sounds to me the RecordSource of your Form is not updatable???

    Have you checked and ensure the Form RecordSource is updatable?

    If you are not sure how to check, please post details of the relevant Table(s) and the SQL String (of the Query) being used as the RecordSource of your Form.


    Van Dinh

    Saturday, November 24, 2012 10:57 PM
  • Hi Barbados,

    Welcome to the MSDN forum.

    How is it going with the problem now?

    Please feel free to let us know if you need any help.

    Have a nice day.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 10, 2012 3:35 AM
  • Hi Barbados,

    Welcome to the MSDN forum.

    How is it going with the problem now?

    Please feel free to let us know if you need any help.

    Have a nice day.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thank you Yoyo Jiang, I managed to resolve this particular problem but still dealing with a handful of other issues too..
    Monday, December 10, 2012 3:43 AM
  • I'm glad to hear that.

    Would you please mark the helpful reply as answer or share the solution with us?

    Thanks for your time.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 10, 2012 6:52 AM