David McAfee
davidmcafee at gmail.com
Thu Jul 21 14:17:53 CDT 2011
I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub