Search results

  1. T

    Design Suggestions Please

    Hello I am just starting a business from home for Computer repair/software/hardware upgrades etc. I am designing a database to record the work I do and to provide the customer with a receipt for the work. The work would be itemized in a form (much like an invoice you would receive). I have a...
  2. T

    Field number as variable

    Sorry folks I guess I was having a brain dead moment. The field name Number is a reserved word. I changed the fieldname and everything works fine. Thanks Terry
  3. T

    Field number as variable

    I resolved it using dcount. But now I get a syntax error in the SQL statement when Im trying to run it: For x = 1 To 100 DoCmd.SetWarnings False i = DCount("[No1]", "tbldrawings", "[No1] =" & x) j = DCount("[No2]", "tbldrawings", "[No2] =" & x) k = DCount("[No3]", "tbldrawings", "[No3] ="...
  4. T

    Field number as variable

    Hello I have a db table that contains 6 columns I am trying to build an update query from the table The first time strSQL runs, the data would be inserted into field(1) The next time it would be inserted into field(2) etc... When it runs, I get an error saying there is no destination field in...
  5. T

    Iterate through numbered variables

    Hello I have a series of variables ( var1 - var20 ) I also have txtboxes numbered txt1 to txt20 I am trying to set all the variables to 0 by using a for loop dim x as integer dim c as string for x = 1 to 20 c="var" c & x = 0 next x This does not work for the txtboxes: for y = 1 to 20...
  6. T

    Find Top n in a table

    I was able to get by the error above (I did not set the db=currentdb. Can anyone suggest what may be wrong with this code? I keep getting the message that the item not found in this collection. Table has data Field names are numbers 1-100 Dim rs As DAO.Recordset Dim db As Database Dim...
  7. T

    Find Top n in a table

    I have been working on this but still cannot find a way to get it done. Here is the code I am using: Dim rs As DAO.Recordset Dim db As Database Dim strDta As String Dim fld As DAO.Field Dim fldcnt As Integer Dim tbf As DAO.TableDef Dim strTblName As String strTblName = "MyMatrix" Set tbf =...
  8. T

    Find Top n in a table

    I can see what the problem is. It is that the table holds no "values", but instead holds objects (fields) that contain values. So I do not believe this will work the way I wanted to do it. My idea now is to Iterate through the 100 fields in the table using a select statement to find the max...
  9. T

    Find Top n in a table

    All the examples in help seem to refer to a table.field value. However, I am looking for a way to find the top n values in a table, not /field. Each field could potentially have duplicate numbers (but not on the same record). Overall, what I need is to have the top n values in the table...
  10. T

    Find Top n in a table

    Hello Is there a way to find the top n values in a table? I know I can find the top n in a field, but how can I search the entire table to find the top n values in the entire table? Each field in the table could have the same values as the other fields Thank you Terry
  11. T

    Logistical Help

    Hey Adam Thank you so much, works like a charm I really do appreciate you taking this amount of time and effort to help me out here. I have also added to your reputation Again, thank you so much Terry
  12. T

    Logistical Help

    One thing I have not mentioned is the access version > 2003
  13. T

    Logistical Help

    Hi Adam I have tried it with both of those lines and at the point of If .Fields(i) = x Then I get the error 3265 : Item not found in this selection. It happens when i = 5 My table has field names 1, 2, 3, 4, 5 I tried using option base 1 and changing for i=0 to 4 to For i = 1 to 5 My...
  14. T

    Logistical Help

    My mistake adam, I was putting the msgbox in the wrong place, it does reflect the right number of records (1 and 1095, 2 and 1095, 3 and 1095 etc). But still does not populate the table with a count of occurences. Im not sure where in the code it actually does a count to update the field...
  15. T

    Logistical Help

    Hi Adam If this helps at all, you can see in the code, I've included a msgbox for a record count. rs comes up with 1 record in the recordset and rs2 comes up with 0. Thanks Adam, it is very much appreciated. Terry
  16. T

    Logistical Help

    Hi Adam Function TerrysFunction() Dim tbl As TableDef, rs As Recordset, rs2 As Recordset Dim fld As Field, x As Integer, i As Integer, j As Integer Set tbl = CurrentDb.CreateTableDef("mymatrix") With tbl .Fields.Append .CreateField("myNumber", dbLong) End With For x = 1 To...
  17. T

    Logistical Help

    The code does build the matrix (100 x 100). 100 fields (1-100) and 100 rows. However, there is no data in the matrix (no records except the row numbers 1 - 100. I created a table called table1 where I simply put the 5 columns of data in it. Any suggestions? Thanks so much Terry
  18. T

    Logistical Help

    Adam Thanks so much for the reply I think I follow most of the logic, but Im not sure about it all. 1. It does create a table called mymatrix and creates the fieldnames 2. I place the name of my table where you have "Yournumbertable" 3. I get a 3020 error (Update or CancelUpdate without...
  19. T

    Logistical Help

    Hello Scenario I have 5 fields (F1,F2,F3,F4,F5) I have numbers 1 through 100 that could show up in each field. Each row will not contain duplicates, but there could be many instances of the same number for the full scope of the recordset. Ex: Number 5 Exists 10 times in the 5000 records...
  20. T

    Convert a number to the typed value of the number

    Hello Is there a way in Access 2003 to convert a number to the typed value for the number? Ex: Number: 1 Converted: One Number: 55 Converted: FiftyFive (or Fifty Five) Thank you Terry
Back
Top Bottom