gsilouisvilleic
asked on
Macro if Statement Backward compatible
I have a Access Database that was made on Access 2016 but when i tried it on Access 2007, there was a backward compatible issue. i have my database file attach if anyone can see how to fix it. I know it has to do with the if statements on my macro but dont know how to fix it. thank you
Test.accdb
Test.accdb
I opened your uploaded file in both Access 2016 - Windows 10, and Access 2007 - Windows Vista. Both opened main form. What is the issue, try to step me through to see the problem
ASKER
its the macro. so click on the inspection form button then on the inspection form click on save record button on the bottom left.
I think the best way to deal with this problem is to replace the embedded macros with code -- there is nothing complicated here. To open the inspection code to a new record, no code is needed; just set its DataEntry property to Yes. To open the inspection form from the main menu and close the menu, this code is all you need:
Private Sub B_Save_F_Inspection_Form_Click()
DoCmd.OpenForm "F_Inspection Form"
DoCmd.Close acForm, Me.Name
End Sub
For Macro1, on the Save button, this code could also be converted to VBA code -- it is long, but not at all complicated.
its the macroI'll be back to it if issue not resolved.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Even though it may not cause an error here, it still is not a good idea to name table fields Date, Time, Sum, etc.
Nothing is absolute no!
But if naming is not followed properly, it restricts you of using some forms of statements.
https://support.office.com/en-US/article/guidelines-for-naming-fields-controls-and-objects-3c5d8ebd-08b5-472a-ae57-c3632910068b
But if naming is not followed properly, it restricts you of using some forms of statements.
https://support.office.com/en-US/article/guidelines-for-naming-fields-controls-and-objects-3c5d8ebd-08b5-472a-ae57-c3632910068b
ASKER
Thank you both for your help. We are going to update all system to the new Access 2016 which will not have the issue anymore.