Search results

  1. N

    how to reference textbox in a tab control on a form in access

    Hi Guys, I have a form, named frmResult and a listbox, lstResult. I also have a tab control called tabfirst, which has a textboxes txtrecord1, txtrecord2,..txtrecord5. I would like to multi select rows from my listbox, and have Me.lstResult.Column(1) value populate in the...
  2. N

    Building an If..Else Statment and executing it

    I have the following If..Else statement. Now, I would like to build the individual sections based on user criteria. I would like to know if it is possible to save thes sections as strings and add them to the if else statement. I have tried the same for Select...Where statement by building...
  3. N

    how to add filter control to listbox in access form

    Hi, How to add filter control to column heads(i.e. Fields) of a listbox in a form in access, just as we have filter options in an access table or excel sheet ? Any DB examples or associated URLs would be great on this topic... Thanks,
  4. N

    Query using operator <>

    Well, I am comparing each field agains itself and am trying to cluster the "like values" together to form clusters of data of this table "Gd" which has about 192 columns and 3000 odd rows. I had tried using the same using two tables, which are identical, but I have tried this method and so far...
  5. N

    Query using operator <>

    Ahh...I corrected the brackets, but it still does not work. Yea, I built this is query design and have just copied the SQL statmt here.
  6. N

    Query using operator <>

    Can you give me a small example of this. I have never used (or had to use joins) so far. Can I use joins even for fields from a single table? Thanks,
  7. N

    Query using operator <>

    Hi, I have the foll. querydef, which using a table Gd, which is already clustered based on a similar querydef. SELECT Gd.Count, Gd.Field2, Gd.Field3, Gd.Field13, Gd.Field15, Gd.Field15_2, Gd.Field23, Gd.Field31, Gd.Field35, Gd.Field36, Gd.Field41, Gd.Field45, Gd.Field46, Gd.Field51...
  8. N

    Syntax error with "Between" function in VBA/Access

    I am getting a syntax error for the If statement in the foll. code. where rs_cluster is a recordset. I am not able to figure out how to use the Between function to check for values of Field36 between a certain range shown below. Dim curF15_2, curF31, curF35, curF36, curF46, curF57, curF58...
  9. N

    Question Update Field in Table using ADODB Recordset

    Thanks for the suggestions, yes I figured it out. However, this was only an example and what I would really like to have is to index (ie add a value to "Count") every record where the values of "Field2" are the same. So for example, if I have 3 records of Field2 = "0353085" then I would like to...
  10. N

    Question Update Field in Table using ADODB Recordset

    Hello All, I have the foll code: I would like to update the "Count" Field based on value of "Field2". I am getting an error for the rs_cluster.EditMode. Please let me now if my If block makes sense or is it only a syntax errro ? Private Sub cmdCluster_Click() Dim rs_cluster As ADODB.Recordset...
  11. N

    Referencing string value in SQL Access 2007

    Hello Guys, I have the foll statement: If (Me.cmb_firststage = "1st Stage Drum" And Me.cmb_firststage_elements = "shoulder contur or EST" And Len(Nz(cmb_firststage_elements_values, "") > 0)) Then strwhere = "WHERE (( [List].[Field11])= txtvalue);" Here...
  12. N

    Populate Combo box using recordset in vba

    well, I tried : If Me.cmb_firststage = "1st Stage Drum" Then Do While rs_firststage.EOF cmb_firststage_elements.RowSource = rs_firststage!Field2 Loop ..but does not work.. I did not get the SQL statment method ? thanks for your concern!
  13. N

    Populate Combo box using recordset in vba

    Hello All, I am using the foll. code to populate my combo box. Private Sub cmb_firststage_Click() Dim rs_main As ADODB.Recordset Set rs_main = New ADODB.Recordset Dim cnn_main As ADODB.Connection Set cnn_main = CurrentProject.Connection rs_main.ActiveConnection = cnn_main rs_main.LockType =...
  14. N

    SQL Syntax error in VBA/Access

    Ahh...I got mixed up, sorry. I tried to use values from recordset as tables/fields, and that does not make sense. I realized I do not need it now. thanks for the suggestions though. As a side question, in the "like" section of SQL, can I use operators >,< along with Me!txtname ? How would it...
  15. N

    SQL Syntax error in VBA/Access

    Dim strSQL_ar As String If (Len(Nz(txtaspectratio, "")) > 0 And Len(Nz(txtaspectratioop, "")) > 0 And (Len(Nz(txtaspectratiovalue, "") > 0))) Then strSQL_ar = " SELECT DISTINCT " & rs_tw!Field3 & " FROM " & rs_tw!Field3 & " WHERE " & rs_tw!Field3 & " Like '%/" & Me!txtaspectratiovalue & "R%'"...
  16. N

    SQL Syntax error in VBA/Access

    OK, the syntax issue is solved, however , I am getting " Syntax error(missing operator) in query expression '155/65R1373T' (which would be the first record of rs_tw!Field3)
  17. N

    SQL Syntax error in VBA/Access

    Apologies...yes I put the ampersand after "FROM" and still get the syntax error for: strSQL = " SELECT DISTINCT " & rs_tw!Field3 & " FROM " & rs_tw!Field3 & " WHERE " & rs!Field3 & Like '%" & "/" & Me!txtaspectratiovalue & "R%'"
  18. N

    SQL Syntax error in VBA/Access

    Sorry..I am getting syntax error. I am using this: strSQL = " SELECT DISTINCT " & rs_tw!Field3 & " FROM " rs_tw!Field3 & " WHERE " & rs!Field3 & Like '%" & "/" & Me!txtaspectratiovalue & "R" & "%'" thx,.
  19. N

    SQL Syntax error in VBA/Access

    Yes, the recordset rs_tw takes in Field3 and Field7 from Table [List]. I tried the following but it gives an error: strSQL = " SELECT DISTINCT " & rs_tw!Field3& " FROM " rs_tw!Field3 & " WHERE " & rs!Field3 & Like '%" & "/" & Me!txtaspectratiovalue & "R" & "%'" Also, can I still use the...
  20. N

    SQL Syntax error in VBA/Access

    Thanks Leigh. It worked perfect. NOw, another doubt I have is, I need to build another query using the same data. However, I have no idea how to reference the records from the previous recordset. I have put the code below, if you can help me in this, it would be great! Dim rs_tw As...
Back
Top Bottom