Results 1 to 9 of 9

Thread: Access Problem !

  1. #1

    Thread Starter
    Addicted Member Diab's Avatar
    Join Date
    Apr 2001
    Posts
    185

    Angry Access Problem !

    Hi

    In My Table There Are Two Fields Index(the key) and number
    I Want To The Number To Be As Defult
    2^(Index-1) How Can I do This ???

    PLS HLP THX

  2. #2
    Addicted Member Supester's Avatar
    Join Date
    Nov 2001
    Location
    The Netherlands
    Posts
    220
    Hi

    In My Table There Are Two Fields Index(the key) and number
    I Want .....

    this is what I understand and then u lose me.....

    can you rephrase the question?

  3. #3

    Thread Starter
    Addicted Member Diab's Avatar
    Join Date
    Apr 2001
    Posts
    185

    Talking oops !!

    Sorry ...

    I Want Tha Value Of The Field Number To Be Equal To :

    Number = 2^(Index-1) ..... (<Index> The Field )

    Thanks

  4. #4
    Addicted Member Supester's Avatar
    Join Date
    Nov 2001
    Location
    The Netherlands
    Posts
    220
    so if i understand u correctly:

    table

    index - Number

    1 1
    2 4
    3 9

    something like this?

    do you do this directly in Access or using VB?

  5. #5

    Thread Starter
    Addicted Member Diab's Avatar
    Join Date
    Apr 2001
    Posts
    185

    Wink Ok Good

    Finaly I Explane My Self Good !

    So I Know How To Do This From VB
    I Need To Do it In The Accsess

    Thanks !

  6. #6
    Addicted Member Supester's Avatar
    Join Date
    Nov 2001
    Location
    The Netherlands
    Posts
    220
    Why not do it similarly then? Use a query to retrieve the values and write the squared values back....

  7. #7

    Thread Starter
    Addicted Member Diab's Avatar
    Join Date
    Apr 2001
    Posts
    185

    Unhappy How

    How Can I Do THIS

  8. #8
    Addicted Member Supester's Avatar
    Join Date
    Nov 2001
    Location
    The Netherlands
    Posts
    220
    Public Sub AA()
    Dim rs As Recordset
    Dim squery As String

    squery = "SELECT * FROM Table"
    Set rs = CurrentDb.OpenRecordset(squery)

    while not rs.eof

    wend

    MsgBox rs.RecordCount
    End Sub


    the keyword here is

  9. #9
    Addicted Member Supester's Avatar
    Join Date
    Nov 2001
    Location
    The Netherlands
    Posts
    220
    halfway there

    while not rs.eof
    'do something with the rs
    currentdb.execute yournewquery
    wend

    hope this helps.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width