Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

SQL Statement trying to call column not specified in statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Trepalium@gmail.com - 15 May 2007 20:49 GMT
I'm having some trouble with a sql statement within my sub. For some
reason, it wants to reference CLPROPSTRTNMBER when I specifically
asked for CLPROPSTRTNMBR (which is the correct column name). The code
is below. I cannot figure out why it's trying to pull this reference.

Public Sub D2REDataCall()
Call DBConnect

sql = "SELECT
CLMAILADDRESS,CLMAILCITY,CLMAILSTATE,CLMAILZIP,CLPROPSTRTNMBR,CLPROPSTREETADDR,CLPROPSTREETUNIT,CLPROPCITY,CLPROPSTATE,CLPROPZIP,CLPROPCOUNTY,CLCREDITREPORTDT,CLRATEEFFECTIVEDT,CLCLOSEDT,CLTOTALLOANAMT,CLINTERESTRATE,CLTILAPR,CLTERM
FROM " & tblCustInfoD2RE & " WHERE CLAPPLNUMBER = '" & AppID & "'"
rsdata.Open (sql)

MtxtStreetAddress.Enabled = True
MtxtStreetAddress.Value = rsdata("CLMAILADDRESS")
MtxtStreetAddress.Locked = True

MtxtCity.Enabled = True
MtxtCity.Value = rsdata("CLMAILCITY")
MtxtCity.Locked = True

MtxtState.Enabled = True
MtxtState.Value = rsdata("CLMAILSTATE")
MtxtState.Locked = True

MtxtZip.Enabled = True
MtxtZip.Value = rsdata("CLMAILZIP")
MtxtZip.Locked = True

PtxtStreetAddress.Enabled = True
PtxtStreetAddress.Value = rsdata("CLPROPSTRTNMBR") &
rsdata("CLPROPSTREETUNIT") & " " & rsdata("CLPROPSTREETADDR")
PtxtStreetAddress.Locked = True

PtxtCity.Enabled = True
PtxtCity.Value = rsdata("CLPROPCITY")
PtxtCity.Locked = True

PtxtState.Enabled = True
PtxtState.Value = rsdata("CLPROPSTATE")
PtxtState.Locked = True

PtxtZip.Enabled = True
PtxtZip.Value = rsdata("CLPROPZIP")
PtxtZip.Locked = True

PtxtCounty.Enabled = True
PtxtCounty.Value = rsdata("CLPROPCOUNTY")
PtxtCounty.Locked = True

Text586.Enabled = True
Text586.Value = rsdata("CLCREDITREPORTDT")
Text586.Locked = True

Text588.Enabled = True
Text588.Value = Format(rsdata("CLCREDITREPORTDT"), "MM/DD/YYYY") + 45
Text588.Locked = True

Text590.Enabled = True
Text590.Value = rsdata("CLRATEEFFECTIVEDT")
Text590.Locked = True

Text644.Enabled = True
Text644.Value = rsdata("CLCLOSEDT")
Text644.Locked = True

Text140.Enabled = True
Text140.Value = Format(rsdata("CLTOTALLOANAMT"), "$###,###.##")
Text140.Locked = True

Text205.Enabled = True
Text205.Value = rsdata("CLINTERESTRATE")
Text205.Locked = True

Text207.Enabled = True
Text207.Value = rsdata("CLTILAPR")
Text207.Locked = True

Text86.Enabled = True
Text86.Value = rsdata("CLTERM")
Text86.Locked = True

rsdata.Close

End Sub
Bob Hairgrove - 15 May 2007 21:14 GMT
>I'm having some trouble with a sql statement within my sub. For some
>reason, it wants to reference CLPROPSTRTNMBER when I specifically
[quoted text clipped - 81 lines]
>
>End Sub

What is the type of database where the tables are? IIRC, there was a
limitation of ten characters in some names on Oracle 8i -- maybe the
names are too long? (BTW, you really should rename the controls of
your form to something meaningful/human readable).

--
Bob Hairgrove
NoSpamPlease@Home.com
Trepalium@gmail.com - 15 May 2007 22:38 GMT
> >I'm having some trouble with a sql statement within my sub. For some
> >reason, it wants to reference CLPROPSTRTNMBER when I specifically
[quoted text clipped - 92 lines]
>
> - Show quoted text -

Sorry this is SQL Server 2000
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.