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 / October 2007

Tip: Looking for answers? Try searching our database.

help please

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
misschanda - 25 Oct 2007 21:01 GMT
On Form received an error that led me back to the is line in my sql:

REVNUM GRID = list. 10 column(5, list 10. list index + 1)

I was told from post to make the REVNUM GRID a String.

How is this done??

-LA

http://www.accessmonster.com/Uwe/Forum.aspx/access-forms/49863/List-Form-SQL-Hel

p#7a1f7cb4b291cuwe
Klatuu - 25 Oct 2007 21:47 GMT
Not enough info to help.  Please describe what you are trying to do.
Signature

Dave Hargis, Microsoft Access MVP

> On Form received an error that led me back to the is line in my sql:
>
[quoted text clipped - 9 lines]
>
> p#7a1f7cb4b291cuwe
Richnep - 25 Oct 2007 23:22 GMT
On Oct 25, 4:01 pm, "misschanda via AccessMonster.com" <u36612@uwe>
wrote:
> On Form received an error that led me back to the is line in my sql:
>
[quoted text clipped - 12 lines]
> --
> Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200710/1

More info def :)
John W. Vinson - 26 Oct 2007 05:25 GMT
>On Form received an error that led me back to the is line in my sql:
>
[quoted text clipped - 9 lines]
>
>p#7a1f7cb4b291cuwe

This is not valid SQL in any context that I've ever heard of. And it's not
even valid VBA.

If you have a variable named RevnumGrid, you CANNOT arbitrarily insert a blank
in it. To Access, the expressions "RevnumGrid" and "Revnum Grid" are totally
different and unrelated (computers are VERY dumb and literal minded after
all!) Similarly, if you have a (very badly named!!!) listbox named List10, you
cannot refer to List 10. List index - you must refer to List10.ListIndex (the
capitalization isn't important but the spacing is).

I *THINK* from following the link to accessmonster and looking at the code
that all you need to do is find the line near the top which says

Dim RevnumGrid As Integer

and change it to

Dim RevnumGrid As String

but since I have no idea what's in these listboxes or what RevnumGrid might
mean, I can't be sure. I can say for certain that this is a very strangely
designed bunch of code, and probably NOT the simplest way to get your task
done!

            John W. Vinson [MVP]
misschanda - 30 Oct 2007 17:07 GMT
have a form.. that when needed to be revised(revision number or whatever
else neccessary) the user clicks on a button and another form appears, that
allows the user to click the record in the main form and click on it to be
revised.  I am getting the following error that says data mismatch, and goes
directly to the line of the code: RevNumGrid = List10. Column (5, LIst 10.
ListIndex + 1).

Hopefully, when finished the new revision number will be +1.

Any help is Appreciated
-LA

Private Sub Command4_Click()
  Dim QueryTxt As String
  Dim QueryParm As String
  Dim TrialNum As String
  Dim LineNum As String
  Dim RevNum As Integer
  Dim RevNumGrid As Integer
  Dim RevNumToRetreive As Integer
  Dim rs1 As DAO.Recordset
  Dim db1 As DAO.Database
 Set db1 = CurrentDb

         
  TrialNum = List10.Column(3, List10.ListIndex + 1)
  RevNumGrid = List10.Column(5, List10.ListIndex + 1)
         
 
  Select Case Frame8
 
     Case 1
         'Create a new version of the selected Guideline...
         'First retrieve the highest revision number...
         If List10.Column(3, List10.ListIndex + 1) = "Trial_Number" Then
             MsgBox "You must select a Lab Line record to copy to a new
revision."
             Exit Sub
         End If
         
         QueryTxt = "SELECT Max([Revision]) AS Expr1 FROM
[Lab_LIne_Processing_Record2] WHERE [Lab_LIne_Processing_Record2].
Trial_Number='" + List10.Column(3, List10.ListIndex + 1) + "' AND
[Lab_LIne_Processing_Record2].Project_Number='" + List10.Column(4, List10.
ListIndex + 1) + "';"
         Set rs1 = db1.OpenRecordset(QueryTxt, dbOpenDynaset)
         
         RevNum = rs1!Expr1 + 1
     
        'Copy the selected guideline to a new Trial number... increment the
revision number...
         QueryTxt = "INSERT INTO [Lab_LIne_Processing_Record2] (
Trial_Number, Project_Number, Revision, Reference_Number, date, Objective,
Type, Extrusion_comments, Color, Drawing_comments, further_testing, summary,
comments, Input Data, Extruder_O single_(O_PET_O_Nylon, Extruder_O_Twin,
To_Insert_Graph/ Picture/ ETC, Size(MM), spool_type, Diameter_(in),
tenacity1_(g/den), Shrinkage %_(at)1, ShrinkageTemp(F)1, denier, Tenacity_
(g/den)2, elong_%2, "
         QueryTxt = QueryTxt + "Modulus (g/den)1, Shrink % (at)2, Loop
Tenacity1, notes, Sample_collected, % Resin, lbs used, Dry Temp (F), dry time
(hrs), Elong %1, Screw Speed, Pump Speed, Feeder Speed, Orifice Diameter (in),

# of Holes, Screen size, Throat, Feed, Zone, "
         QueryTxt = QueryTxt + "Zone 3, Zone 4, Zone 5, Zone 5 Melt Temp (F)
, Zone 6, Adaptor 1, Die, Adaptor 2, Torque, Screw Pressure, Die Pressure,
Bath Temp (F), Air Gap (in), Cradle Position (in), Ovality, Diameter D,
Sample, 1st Strand FPM, Oven 1 Temp (F), Oven 2 Temp (F), Oven 3 Temp (F),
Elong % 2, Shrinkage % (at)2, Graph, Screw Type, Quenching, Bath Material,
TBD1, TBD2, TBD3, TBD4, TBD5, TBD6, TBD7, TBD8, TBD9, TBD10, TBD11, TBD12,
Finish Type, Finish Speed, Screen Type, Die, Hole Size, Loop Tenacity2,
Modulus (g/den)2, Shrinkate Temp (F)2, DrawRatio1, DrawRatio2, DrawRatio3,
Standspeed1 ) "
         QueryTxt = QueryTxt + "SELECT '" + TrialNum + "' AS Expr1, '" +
LineNum + "' AS Expr2, " + Str(RevNum) + " AS Expr3,
[Lab_LIne_Processing_Record2].Reference_Number, [Lab_LIne_Processing_Record2].

date, [Lab_LIne_Processing_Record2].Objective, [Lab_LIne_Processing_Record2].
Type, [Lab_LIne_Processing_Record2].Extrusion_comments,
[Lab_LIne_Processing_Record2].Color, [Lab_LIne_Processing_Record2].
Drawing_comments, "
         QueryTxt = QueryTxt + "[Lab_LIne_Processing_Record2].
further_testing, [Lab_LIne_Processing_Record2].summary,
[Lab_LIne_Processing_Record2].comments, [Lab_LIne_Processing_Record2].Input
Data, [Lab_LIne_Processing_Record2].Extruder_O single_(O_PET_O_Nylon,
[Lab_LIne_Processing_Record2].Extruder_O_Twin, [Lab_LIne_Processing_Record2].
To_Insert_Graph/ Picture/ ETC, [Lab_LIne_Processing_Record2].Size(MM),
[Lab_LIne_Processing_Record2].spool_type, [SST006_Manufacturing "
         QueryTxt = QueryTxt + "Guidelines_Header].Diameter_(in),
[Lab_LIne_Processing_Record2].tenacity1_(g/den), [Lab_LIne_Processing_Record2]

.Shrinkage %_(at)1, [Lab_LIne_Processing_Record2].ShrinkageTemp(F)1,
[Lab_LIne_Processing_Record2].denier, [Lab_LIne_Processing_Record2].Tenacity_
(g/den)2, [Lab_LIne_Processing_Record2].elong_%2,
[Lab_LIne_Processing_Record2].Elong % 2, [Lab_LIne_Processing_Record2].
Shrinkage % (at)2, [Lab_LIne_Processing_Record2].Graph, "
         QueryTxt = QueryTxt + "[Lab_LIne_Processing_Record2].Screw Type ,
[Lab_LIne_Processing_Record2].Quenching, [Lab_LIne_Processing_Record2].Bath
Material, [Lab_LIne_Processing_Record2].TBD1, [Lab_LIne_Processing_Record2].
TBD2, [Lab_LIne_Processing_Record2].TBD3, [Lab_LIne_Processing_Record2].TBD4,
[Lab_LIne_Processing_Record2].TBD5, [Lab_LIne_Processing_Record2].Modulus
(g/den)1, "
         QueryTxt = QueryTxt + " [Lab_LIne_Processing_Record2].Shrink % (at)
2, [Lab_LIne_Processing_Record2].Loop Tenacity1, [Lab_LIne_Processing_Record2]

.notes, [Lab_LIne_Processing_Record2].Sample_collected,
[Lab_LIne_Processing_Record2].% Resin, [Lab_LIne_Processing_Record2].lbs used,

[Lab_LIne_Processing_Record2].Dry Temp (F), [Lab_LIne_Processing_Record2].dry
time (hrs), [Lab_LIne_Processing_Record2].Elong %1, "
         QueryTxt = QueryTxt + "[Lab_LIne_Processing_Record2].Screw Speed,
[Lab_LIne_Processing_Record2].Pump Speed, [Lab_LIne_Processing_Record2].
Feeder Speed, [Lab_LIne_Processing_Record2].Orifice Diameter (in),
[Lab_LIne_Processing_Record2].# of Holes, [Lab_LIne_Processing_Record2].
Screen size, [Lab_LIne_Processing_Record2].Throat,
[Lab_LIne_Processing_Record2].Feed, [Lab_LIne_Processing_Record2].Zone, "
         QueryTxt = QueryTxt + " [Lab_LIne_Processing_Record2].TBD6,
[Lab_LIne_Processing_Record2].TBD7, [Lab_LIne_Processing_Record2].TBD8,
[Lab_LIne_Processing_Record2].TBD9, [Lab_LIne_Processing_Record2].TBD10,
[Lab_LIne_Processing_Record2].TBD11, [Lab_LIne_Processing_Record2].DrawRatio1,

[Lab_LIne_Processing_Record2].DrawRatio2, [Lab_LIne_Processing_Record2].
DrawRatio3, "
         QueryTxt = QueryTxt + " [Lab_LIne_Processing_Record2].Finish Type,
[Lab_LIne_Processing_Record2].Finish Speed, [Lab_LIne_Processing_Record2].
Screen Type, [Lab_LIne_Processing_Record2].RollStand4,
[Lab_LIne_Processing_Record2].PercentRelax, [Lab_LIne_Processing_Record2].Die,

[Lab_LIne_Processing_Record2].Hole Size, [Lab_LIne_Processing_Record2].Loop
Tenacity2, [Lab_LIne_Processing_Record2].Modulus (g/den)2,
[SST006_Manufacturing "
         QueryTxt = QueryTxt + "Guidelines_Header].Shrinkate Temp (F)2,
[Lab_LIne_Processing_Record2].Standspeed1, [Lab_LIne_Processing_Record2].,
[Lab_LIne_Processing_Record2].Zone 3, [Lab_LIne_Processing_Record2].Zone 4,
[Lab_LIne_Processing_Record2].Zone 5, [Lab_LIne_Processing_Record2].Zone 5
Melt Temp (F), [Lab_LIne_Processing_Record2].Zone 6,
[Lab_LIne_Processing_Record2].Adaptor 1, [Lab_LIne_Processing_Record2].Die, "
         'QueryTxt = QueryTxt + "[Lab_LIne_Processing_Record2].Adaptor 2,
[Lab_LIne_Processing_Record2].Torque, [Lab_LIne_Processing_Record2].Screw
Pressure, [Lab_LIne_Processing_Record2].Die Pressure,
[Lab_LIne_Processing_Record2].Bath Temp (F), [Lab_LIne_Processing_Record2].
Air Gap (in), [Lab_LIne_Processing_Record2].Cradle Position (in),
[Lab_LIne_Processing_Record2].Ovality, [SST006_Man"
         QueryTxt = QueryTxt + "[Lab_LIne_Processing_Record2].Adaptor 2,
[Lab_LIne_Processing_Record2].Torque, [Lab_LIne_Processing_Record2].Screw
Pressure, [Lab_LIne_Processing_Record2].Die Pressure,
[Lab_LIne_Processing_Record2].Bath Temp (F), '1000/4000' as Expr4,
[Lab_LIne_Processing_Record2].Cradle Position (in),
[Lab_LIne_Processing_Record2].Ovality, [SST006_Man"
         QueryTxt = QueryTxt + "ufacturing Guidelines_Header].Diameter D,
[Lab_LIne_Processing_Record2].Sample, [Lab_LIne_Processing_Record2].1st
Strand FPM, [Lab_LIne_Processing_Record2].Oven 1 Temp (F) "
         QueryTxt = QueryTxt + "FROM [Lab_LIne_Processing_Record2] WHERE ((
([Lab_LIne_Processing_Record2].Trial_Number)='" + TrialNum + "') AND ((
[Lab_LIne_Processing_Record2].Project_Number)='" + LineNum + "') AND ((
[Lab_LIne_Processing_Record2].Revision)=" + RevNumGrid + "));"

         DoCmd.RunSQL QueryTxt
         
         RevNumToRetreive = RevNum
         
     Case 2
         If Trial_Number.Value = "" Or Project_Number.Value = "" Or List10.
Column(3, List10.ListIndex + 1) = "Trial_Number" Then
             MsgBox "You must enter a value into both MG Identifier and
Line Number."
             Exit Sub
         End If
               
        'Copy the selected trial .. make it version 1...
         QueryTxt = "INSERT INTO [Lab_LIne_Processing_Record2] (
Trial_Number, Project_Number, Revision, Reference_Number, date, Objective,
Type, Extrusion_comments, Color, Drawing_comments, further_testing, summary,
comments, Input Data, Extruder_O single_(O_PET_O_Nylon, Extruder_O_Twin,
To_Insert_Graph/ Picture/ ETC, Size(MM), spool_type, Diameter_(in),
tenacity1_(g/den), Shrinkage %_(at)1, ShrinkageTemp(F)1, denier, Tenacity_
(g/den)2, elong_%2, "
         QueryTxt = QueryTxt + "Modulus (g/den)1, Shrink % (at)2, Loop
Tenacity1, notes, Sample_collected, % Resin, lbs used, Dry Temp (F), dry time
(hrs), Elong %1, Screw Speed, Pump Speed, Feeder Speed, Orifice Diameter (in),

# of Holes, Screen size, Throat, Feed, Zone, "
         QueryTxt = QueryTxt + "Zone 3, Zone 4, Zone 5, Zone 5 Melt Temp (F)
, Zone 6, Adaptor 1, Die, Adaptor 2, Torque, Screw Pressure, Die Pressure,
Bath Temp (F), Air Gap (in), Cradle Position (in), Ovality, Diameter D,
Sample, 1st Strand FPM, Oven 1 Temp (F), Elong % 2, Shrinkage % (at)2, Graph,
Screw Type, Quenching, Bath Material, TBD1, TBD2, TBD3, TBD4, TBD5, TBD6,
TBD7, TBD8, TBD9, TBD10, TBD11, TBD12, Finish Type, Finish Speed, Screen Type,

Die, Hole Size, Loop Tenacity2, Modulus (g/den)2, Shrinkate Temp (F)2,
DrawRatio1, DrawRatio2, DrawRatio3, Standspeed1 ) "
         QueryTxt = QueryTxt + "SELECT '" + Trial_Number.Value + "' AS
Expr1, '" + Project_Number.Value + "' AS Expr2, 1 AS Expr3,
[Lab_LIne_Processing_Record2].Reference_Number, [Lab_LIne_Processing_Record2].

date, [Lab_LIne_Processing_Record2].Objective, [Lab_LIne_Processing_Record2].
Type, [Lab_LIne_Processing_Record2].Extrusion_comments,
[Lab_LIne_Processing_Record2].Color, [Lab_LIne_Processing_Record2].
Drawing_comments, "
         QueryTxt = QueryTxt + "[Lab_LIne_Processing_Record2].
further_testing, [Lab_LIne_Processing_Record2].summary,
[Lab_LIne_Processing_Record2].comments, [Lab_LIne_Processing_Record2].Input
Data, [Lab_LIne_Processing_Record2].Extruder_O single_(O_PET_O_Nylon,
[Lab_LIne_Processing_Record2].Extruder_O_Twin, [Lab_LIne_Processing_Record2].
To_Insert_Graph/ Picture/ ETC, [Lab_LIne_Processing_Record2].Size(MM),
[Lab_LIne_Processing_Record2].spool_type, [SST006_Manufacturing "
         QueryTxt = QueryTxt + "Guidelines_Header].Diameter_(in),
[Lab_LIne_Processing_Record2].tenacity1_(g/den), [Lab_LIne_Processing_Record2]

.Shrinkage %_(at)1, [Lab_LIne_Processing_Record2].ShrinkageTemp(F)1,
[Lab_LIne_Processing_Record2].denier, [Lab_LIne_Processing_Record2].Tenacity_
(g/den)2, [Lab_LIne_Processing_Record2].elong_%2,
[Lab_LIne_Processing_Record2].Elong % 2,Graph [Lab_LIne_Processing_Record2].
Shrinkage % (at)2, [Lab_LIne_Processing_Record2].Graph, "
         QueryTxt = QueryTxt + "[Lab_LIne_Processing_Record2].Screw Type ,
[Lab_LIne_Processing_Record2].Quenching, [Lab_LIne_Processing_Record2].Bath
Material, [Lab_LIne_Processing_Record2].TBD1, [Lab_LIne_Processing_Record2].
TBD2, [Lab_LIne_Processing_Record2].TBD3, [Lab_LIne_Processing_Record2].TBD4,
[Lab_LIne_Processing_Record2].TBD5, [Lab_LIne_Processing_Record2].Modulus
(g/den)1, "
         QueryTxt = QueryTxt + " [Lab_LIne_Processing_Record2].Shrink % (at)
2, [Lab_LIne_Processing_Record2].Loop Tenacity1, [Lab_LIne_Processing_Record2]

.notes, [Lab_LIne_Processing_Record2].Sample_collected,
[Lab_LIne_Processing_Record2].% Resin, [Lab_LIne_Processing_Record2].lbs used,

[Lab_LIne_Processing_Record2].Dry Temp (F), [Lab_LIne_Processing_Record2].dry
time (hrs), [Lab_LIne_Processing_Record2].Elong %1, "
         QueryTxt = QueryTxt + "[Lab_LIne_Processing_Record2].Screw Speed,
[Lab_LIne_Processing_Record2].Pump Speed, [Lab_LIne_Processing_Record2].
Feeder Speed, [Lab_LIne_Processing_Record2].Orifice Diameter (in),
[Lab_LIne_Processing_Record2].# of Holes, [Lab_LIne_Processing_Record2].
Screen size, [Lab_LIne_Processing_Record2].Throat,
[Lab_LIne_Processing_Record2].Feed, [Lab_LIne_Processing_Record2].Zone, "
         QueryTxt = QueryTxt + " [Lab_LIne_Processing_Record2].TBD6,
[Lab_LIne_Processing_Record2].TBD7, [Lab_LIne_Processing_Record2].TBD8,
[Lab_LIne_Processing_Record2].TBD9, [Lab_LIne_Processing_Record2].TBD10,
[Lab_LIne_Processing_Record2].TBD11, [Lab_LIne_Processing_Record2].DrawRatio1,

[Lab_LIne_Processing_Record2].DrawRatio2, [Lab_LIne_Processing_Record2].
DrawRatio3, "
         QueryTxt = QueryTxt + " [Lab_LIne_Processing_Record2].Finish Type,
[Lab_LIne_Processing_Record2].Finish Speed, [Lab_LIne_Processing_Record2].
Screen Type, [Lab_LIne_Processing_Record2].RollStand4,
[Lab_LIne_Processing_Record2].PercentRelax, [Lab_LIne_Processing_Record2].Die,

[Lab_LIne_Processing_Record2].Hole Size, [Lab_LIne_Processing_Record2].Loop
Tenacity2, [Lab_LIne_Processing_Record2].Modulus (g/den)2,
[SST006_Manufacturing "
         QueryTxt = QueryTxt + "Guidelines_Header].Shrinkate Temp (F)2,
[Lab_LIne_Processing_Record2].Standspeed1, [Lab_LIne_Processing_Record2].,
[Lab_LIne_Processing_Record2].Zone 3, [Lab_LIne_Processing_Record2].Zone 4,
[Lab_LIne_Processing_Record2].Zone 5, [Lab_LIne_Processing_Record2].Zone 5
Melt Temp (F), [Lab_LIne_Processing_Record2].Zone 6,
[Lab_LIne_Processing_Record2].Adaptor 1, [Lab_LIne_Processing_Record2].Die, "
         QueryTxt = QueryTxt + "[Lab_LIne_Processing_Record2].Adaptor 2,
[Lab_LIne_Processing_Record2].Torque, [Lab_LIne_Processing_Record2].Screw
Pressure, [Lab_LIne_Processing_Record2].Die Pressure,
[Lab_LIne_Processing_Record2].Bath Temp (F), '1000/4000' as Expr4,
[Lab_LIne_Processing_Record2].Cradle Position (in),
[Lab_LIne_Processing_Record2].Ovality, [SST006_Man"
         QueryTxt = QueryTxt + "[Lab Ine Processing Record2].Diameter D,
[Lab_LIne_Processing_Record2].Sample, [Lab_LIne_Processing_Record2].1st
Strand FPM, [Lab_LIne_Processing_Record2].Oven 1 Temp (F) "
         QueryTxt = QueryTxt + "FROM [Lab_LIne_Processing_Record2] WHERE ((
([Lab_LIne_Processing_Record2].Trial_Number)='" + TrialNum + "') AND ((
[Lab_LIne_Processing_Record2].Project_Number)='" + LineNum + "') AND ((
[Lab_LIne_Processing_Record2].Revision)=" + RevNumGrid + "));"

         DoCmd.RunSQL QueryTxt
         
         RevNumToRetreive = 1
         
         
    Case 3
         If Trial_Number.Value = "" Or Project_Number.Value = "" Then
             MsgBox "You must enter a value into both Trial Number and
Project Number."
             Exit Sub
         End If
       
        'Add a new  number... make it version 1...
         QueryTxt = "SELECT [Lab_LIne_Processing_Record2].* FROM
[Lab_LIne_Processing_Record2] WHERE ucase([Lab_LIne_Processing_Record2].
Trial_Number) = '" + "9999999" + "'"
     
         Set rs1 = db1.OpenRecordset(QueryTxt, dbOpenDynaset)
     
         rs1.AddNew
         rs1!Trial_Number = Trial_Number.Value
         rs1!Project_Number = Project_Number.Value
         rs1!Revision = 1
         rs1!Type = [Type].Value
         rs1!Date = Date
         
         rs1.Update
         
         db1.CLOSE
         
         TrialNum = Trial_Number.Value
         RevNumToRetreive = 1
         
  End Select
     
  QueryTxt = "SELECT [Lab_LIne_Processing_Record2].* FROM
[Lab_LIne_Processing_Record2] WHERE [Lab_LIne_Processing_Record2].
Trial_Number ='" + TrialNum + "' AND [Lab_LIne_Processing_Record2].
Project_Number ='" + LineNum + "' AND [Lab_LIne_Processing_Record2].Revision
=" + Str(RevNumToRetreive) + ";"

  Forms![Lab_Line_Processing_Record_Sheet].RecordSource = QueryTxt
  'Forms![Lab_Line_Processing_Record_Sheet].RecordSource =
"Lab_LIne_Processing_Record2"
  Forms![Lab_Line_Processing_Record_Sheet].Refresh
  DoCmd.CLOSE
     
End Sub

Private Sub Command11_Click()
 
  DoCmd.CLOSE
 
End Sub

Private Sub Form_Load()
'   MsgBox (Option0.Value)
 Frame8.Value = 1
 List10.RowSource = "SELECT [Lab_LIne_Processing_Record2].* FROM
[Lab_LIne_Processing_Record2] WHERE ((([Lab_LIne_Processing_Record2].
Trial_Number)='" + Forms![Lab_Line_Processing_Record2].Trial_Number.Value +
"'));"
 
 
End Sub

>>On Form received an error that led me back to the is line in my sql:
>>
[quoted text clipped - 27 lines]
>
>             John W. Vinson [MVP]
John W. Vinson - 30 Oct 2007 20:01 GMT
> have a form.. that when needed to be revised(revision number or whatever
>else neccessary) the user clicks on a button and another form appears, that
[quoted text clipped - 23 lines]
>   TrialNum = List10.Column(3, List10.ListIndex + 1)
>   RevNumGrid = List10.Column(5, List10.ListIndex + 1)

This line?

Note that the Column property is zero based. List10.Column(5) is the *sixth*
column in the listbox's row source.

What Access is complaining about is that there is a "data type mismatch". That
sounds like you're trying to store a text value into the Integer field
RevNumGrid. Is RevNumGrid actually a number? Are you trying to add one to the
number in the listbox? Your + 1 isn't doing so, it's selecting a row of the
listbox. Since nobody here can see your screen and we have no way to know
what's in the listbox, I have no idea whether the listbox is returning the
correct row or the correct column!

            John W. Vinson [MVP]
misschanda - 30 Oct 2007 21:34 GMT
The columns for the list box are in this order: trial number, project number,
size, date, revision number, material used, and comments available(yes/no)

I changed the 5 to a 4 so that i would refer to revision number and still
given the error.

Thanks
LA

>> have a form.. that when needed to be revised(revision number or whatever
>>else neccessary) the user clicks on a button and another form appears, that
[quoted text clipped - 16 lines]
>
>             John W. Vinson [MVP]
John W. Vinson - 31 Oct 2007 00:11 GMT
>The columns for the list box are in this order: trial number, project number,
>size, date, revision number, material used, and comments available(yes/no)
>
>I changed the 5 to a 4 so that i would refer to revision number and still
>given the error.

4 would be correct. It may be treating all columns of the listbox as text -
try

  RevNumGrid = Val(List10.Column(4, List10.ListIndex + 1))

If you want to increment that number by 1, use

  RevNumGrid = List10.Column(4, List10.ListIndex + 1) + 1

            John W. Vinson [MVP]
 
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.