Ok, so here it is. I'm writing a basic code for my class and have had no luck when it comes to transfering between records. The Next Record Command works perfect but I have no idea what to code for the Previous Command button. If anyone has any ideas or suggestions PLEASE let me know... Here is the code so far, (the cmdPrevious click event is left blank because I have no idea what to put in there) -
'Team 14
-
'This form allows the user to view the data in the text file.
-
-
Option Explicit
-
Private intAccountInformation As Integer
-
-
Private Sub cmdNext_click()
-
Dim strRecord As String * 112
-
Dim strName As String * 30
-
Dim strAddress As String * 35
-
Dim strCity As String * 25
-
Dim strState As String * 2
-
Dim strZip As String * 5
-
Dim strAccount As String * 6
-
Dim strBalance As String * 7
-
Dim curBalance As Currency
-
Get #intAccountInformation, , strRecord
-
If EOF(intAccountInformation) Then
-
MsgBox "There are no more records in the file."
-
Else
-
strName = Mid(strRecord, 1, 30)
-
strAddress = Mid(strRecord, 31, 35)
-
strCity = Mid(strRecord, 66, 25)
-
strState = Mid(strRecord, 91, 2)
-
strZip = Mid(strRecord, 93, 5)
-
strAccount = Mid(strRecord, 97, 6)
-
strBalance = Mid(strRecord, 105, 7)
-
curBalance = CCur(strBalance) / 100
-
lblBalanceData.Caption = Format(curBalance, "$0.00")
-
lblNameData.Caption = strName
-
lblAddressData.Caption = strAddress
-
lblCityData.Caption = strCity
-
lblStateData.Caption = strState
-
lblZipData.Caption = strZip
-
lblAccountData.Caption = strAccount
-
End If
-
End Sub
-
-
Private Sub cmdPrevious_Click()
-
-
End Sub
-
-
Private Sub form_load()
-
Dim strAccountInformation As String
-
intAccountInformation = FreeFile
-
strAccountInformation = App.Path & "\OutPutFile.txt"
-
Open strAccountInformation For Random Access Read As #intAccountInformation Len = 112
-
End Sub
-
-
Private Sub cmdExit_click()
-
Unload Me
-
End Sub
-
-
Private Sub form_unload(cancel As Integer)
-
Close #intAccountInformation
-
End Sub
-
0 1291 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Wm |
last post by:
I'm trying to get a handle on the best way to handle setting up my listings
so that I display groups of about 25 records per page. I currently have a
page that returns over 1,000 names/addresses,...
|
by: george |
last post by:
Can anyone help?
I query a database and return a result on the column "reference".
There might be 7 listings. Each row is displayed in a table, with
links through to a detail page. I am working...
|
by: Bob Bedford |
last post by:
Does exist a next prev function in PHP/Mysql. I've a website with returns
lot of records (say about 200). The user may browse trough the list or
returned records, but he has to click the record...
|
by: Leroy |
last post by:
I really need some help with showing pages of results from queries in
say like groups of 20 with next and previous buttons or links. I'm
having a lot of trouble figuring out the logic of such a...
|
by: Marcel |
last post by:
Hello,
I'm working on a search application for my website. The website contains a
lot of pictures, and a search should return clickable thumbnails. No
problems there. My problem started when I...
|
by: eeh |
last post by:
Hi,
Suppose I have a table "product" with fields id,name,price. I want to
get a resultset of previous and current and next record when the
resultset is sorted by id and id=10. The table data is...
|
by: Karl Roes |
last post by:
Hi All,
I would like some advice on Next / Previous record buttons.
I have a main form for the client, and a continuous subform listing
client transactions. If I open one of these transactions...
|
by: allyn44 |
last post by:
Hello,
I have a table that has null fields that need to be filled in with the value of the previous record
(example below)
id date
1 2/2/02
2
3 4/4/02
4
|
by: sweetline priya |
last post by:
in my project, a table called 'hardware' contains merely 5000 records..its a mysql database.. the user can add, modify or can view this hardware details one by one.. while clicking 'view' button, the...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |