Results 1 to 3 of 3

Thread: Help!!! How do you find current record value?

  1. #1

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262

    Question

    Newbie Here)I have an access database that I am using in VB. I need to return the value of the access database ID# to the program. In other words... I have 30 records, which are actually questions. The program needs to know which question or (Record) is selected. In access, the ID field is set to autonumber and tells which record is being viewed.

    How do I do this in VB. I have exhausted my books. They all say how to move to previous, last, next, first, etc., but do not discuss how to show the current record ID.

    Is it something like...

    dim CurrentRecord as variant
    CurrentRecord = data1.recordset.fields("Id")

    Trying to figure out which record the database is looking at. Is it record 1 of 30 or record 26 of 30. How do I return this value to my program????

    Please offer help.

    Thanks,
    Sal

  2. #2
    Addicted Member curlywink's Avatar
    Join Date
    Mar 2000
    Location
    Manila, Philippines
    Posts
    141

    Talking

    Hi there, if your refering to record position try this...

    dim CurrentRecord as integer
    CurrentRecord = data1.recordset.absoluteposition + 1

    Hope this works for ya ...

  3. #3

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    I'll try it - Thanks

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