Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Visual Basic Programming

Visual Basic Programming Discussion forum for Visual Basic, an event driven programming language and associated development environment from Microsoft for its COM programming model.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-13-2006, 01:25 AM
moonrise moonrise is offline
Learning Programmer
 
Join Date: May 2006
Posts: 40
Rep Power: 10
moonrise is on a distinguished road
Default MS Access

I have a VB6 application which uses MS Access as its backend.

Im familiar with Access and therefore how to place the record
navigation buttons for:

First Record
Next Record
Previous Record
Last Record

How would i code this in VB 6?

I tried the following code on the first button but it doesnt go to the
first record

Code:
rsExecDet.MoveFirst

Me.txtRecordCaption = "Record " & rsExecDet.AbsolutePosition & " of " &
intRecordCount

Last edited by TcM; 01-24-2008 at 08:17 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 01-24-2008, 12:30 AM
mrbar mrbar is offline
Newbie
 
Join Date: Jan 2008
Location: Kuala Lumpur, Malaysia
Age: 36
Posts: 9
Rep Power: 0
mrbar is on a distinguished road
Send a message via MSN to mrbar Send a message via Yahoo to mrbar
Talking Navigating MS Access from VB interface

These are the codes i've done and so far it works well

Code:
Private Sub cmdFirst_Click()
    Adodc1.Refresh
    
    If txtName.Text = "" Then
        'Do nothing
    ElseIf Adodc1.Recordset.BOF = True Then
        'Do nothing
    Else
        Adodc1.Recordset.MoveFirst
    End If
End Sub

Private Sub cmdLast_Click()
    Adodc1.Refresh
    
    If txtName.Text = "" Then
        'Do nothing
    ElseIf Adodc1.Recordset.EOF = True Then
        'Do nothing
    Else
        Adodc1.Recordset.MoveLast
    End If
End Sub

Private Sub cmdPrev_Click()
    If txtName.Text = "" Then
        'Do nothing
    ElseIf Adodc1.Recordset.BOF = True Then
        'Do nothing
    Else
        Adodc1.Recordset.MovePrevious
    End If
End Sub

Private Sub cmdNext_Click()
    If txtName.Text = "" Then
        'Do nothing
    ElseIf Adodc1.Recordset.EOF = True Then
        'Do nothing
    Else
        Adodc1.Recordset.MoveNext
    End If
End Sub

Last edited by TcM; 01-24-2008 at 08:17 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-24-2008, 12:42 AM
v0id's Avatar   
v0id v0id is offline
Retired
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,651
Last Blog:
CherryPy(thon)
Rep Power: 29
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default

Please remember to use the code-tags, both of you. It makes the text more readable.
__________________
05-03-2007 - 11-13-2008
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-24-2008, 08:19 AM
TcM's Avatar   
TcM TcM is offline
Code Warrior
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,332
Rep Power: 68
TcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of light
Default

I added the Code Tags.

Anyways moonrise did you try mrbar code? did it work?

I +rep mrbar for his effort.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access server file from client ahpooh Visual Basic Programming 1 09-06-2007 02:36 PM
[PHP] Faking Shell Access Through PHP pranky PHP Tutorials 2 03-29-2007 07:28 AM
Access server file from Client ahpooh Visual Basic Programming 2 02-14-2007 07:51 PM
Java:Tutorial - Access Modifiers John Java Tutorials 0 12-09-2006 10:57 AM
HXTT Access 2.0.003 Kernel Software Development Tools 0 09-28-2006 08:12 AM


All times are GMT -5. The time now is 11:08 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads