J
James R.
Hi,
Not sure if this is the correct newsgroup, I apologize if it is not.
I have an access database form that is used as a Front End application, it
is connected to a backend database of SQL Server 2005.
My problem is that I'm getting a "Type Mismatch" error; which indicates that
the data being read into the VBA code is either being read in as a string
when it should be an integer, or vice versa.
Now, the problem part is that the data is coming from a textbox on a form
the textbox is called "Mult".
The code is:
Dim RushStatus as Integer
RushStatus = DLookup("TAT", "WorkOrders", "WorkOrder = '" &
Forms!Samples!Child1.Form!WorkOrder & "'")
If RushStatus = 0 Then Me!Mult = 2.5
Me!Mult.DefaultValue = Me!Mult
Ok, so the RushStatus reads in just fine as an integer value. If I debug,
the Me!Mult will be shown as NULL.
What makes this even more puzzling is that the "Mult" column in the SQL
Backend isn't NULL!!! I've checked every single record and all of them have a
value of 1 or higher.
Now, to throw in a little more confusing item. Is the original backend was
an Access backend. If I run this same code on that (the Access version)
backend then Me!Mult gets read in as an Integer value (not as NULL).
I'm at a loss as to how to further troubleshoot this. I'd appreciate any
ideas someone would kick around for this.
I've used SQL Profiler and watched the TSQL coming in and it is just fine,
I've ran the TSQL through Management Studio and got back the proper results.
For some reason, this textbox just won't see that there is a value in this
column.
Thanks in advance for any suggestions you might have!
James
Not sure if this is the correct newsgroup, I apologize if it is not.
I have an access database form that is used as a Front End application, it
is connected to a backend database of SQL Server 2005.
My problem is that I'm getting a "Type Mismatch" error; which indicates that
the data being read into the VBA code is either being read in as a string
when it should be an integer, or vice versa.
Now, the problem part is that the data is coming from a textbox on a form
the textbox is called "Mult".
The code is:
Dim RushStatus as Integer
RushStatus = DLookup("TAT", "WorkOrders", "WorkOrder = '" &
Forms!Samples!Child1.Form!WorkOrder & "'")
If RushStatus = 0 Then Me!Mult = 2.5
Me!Mult.DefaultValue = Me!Mult
Ok, so the RushStatus reads in just fine as an integer value. If I debug,
the Me!Mult will be shown as NULL.
What makes this even more puzzling is that the "Mult" column in the SQL
Backend isn't NULL!!! I've checked every single record and all of them have a
value of 1 or higher.
Now, to throw in a little more confusing item. Is the original backend was
an Access backend. If I run this same code on that (the Access version)
backend then Me!Mult gets read in as an Integer value (not as NULL).
I'm at a loss as to how to further troubleshoot this. I'd appreciate any
ideas someone would kick around for this.
I've used SQL Profiler and watched the TSQL coming in and it is just fine,
I've ran the TSQL through Management Studio and got back the proper results.
For some reason, this textbox just won't see that there is a value in this
column.
Thanks in advance for any suggestions you might have!
James