Hi! i am i trying to make o vb program and i have a big problem.
I have a combination of forms into i put some keywords and i transfer data from one form into an other (from text to text or from labels to texts). I have a command and when i press it, it makes all the work, all the calculations and completes all the tables i have to the forms. The problem is when i have finished i want to keep this calculations. i don't want to lose them and to make them from the begging. The program take the names of the soldiers of the army and put them to a table of tasks. I want to use this program weekly. Is there any solution? A save command?? Or i way to export the tables as it is designed to a word with a simply command??
I Hope to hear news soon. . .
Many thanks J.K.
10 1420
I want to use this program weekly. Is there any solution? A save command?? Or i way to export the tables as it is designed to a word with a simply command??
I Hope to hear news soon. . .
Many thanks J.K.
The easier way to save progress is to save your variables in a text file, then read them when you load it.
If you promess you'll be honest, the text file can have variables as they are, but if not, you'd beter use some cryptography.
HTH
is there a code to load the variables automatically or i have to put them one by one from the beginning??
many thanks for your help
is there a code to load the variables automatically or i have to put them one by one from the beginning??
many thanks for your help
is there a code to load the variables automatically or i have to put them one by one from the beginning??
many thanks for your help
is there a code to load the variables automatically or i have to put them one by one from the beginning??
many thanks for your help
is there a code to load the variables automatically or i have to put them one by one from the beginning??
many thanks for your help
Yes, gon on my FREE VB TOOLS and you will find how to SAve and OPen a *.txt FILES.
BorlandDelphi
is there a code to load the variables automatically or i have to put them one by one from the beginning??
many thanks for your help
Well, there's not a magic code, but its quite simple. I'll write a little example where i define a couple of public variables, a Sub to save them and a Sub to load them: - dim Var1 as string
-
dim Var2 as string
-
-
sub SaveVars()
-
dim Lon1 as integer
-
var1 = inputbox("write Var1") 'you dont need this, is just for this
-
var2 = inputbox("write Var2") 'example not to have empty variables.
-
lon1 = freefile
-
open "C:\SaveGame.txt" for output as #lon1
-
print #lon1, var1
-
print #lon1, var2
-
close #lon1
-
end sub
-
-
sub LoadVars()
-
dim Lon1 as integer
-
lon1 = freefile
-
open "C:\SaveGame.txt" for input as #lon1
-
input #lon1, var1
-
input #lon1, var2
-
close #lon1
-
msgbox "your first variable is: " & var1
-
msgbox "your second variable is: " & var2
-
end sub
you can run the first sub to store a couple of words, then close your application, or turn off your computer, then run only the second sub to see how it works (make sure you turn on your computer again before this step).
HTH
Hah, so many code, so many work. Insert my Free VB Tools - Easy Open and Easy Save *.ocx,add to the form and the work is finished
BorlandDelphi
Hah, so many code, so many work. Insert my Free VB Tools - Easy Open and Easy Save *.ocx,add to the form and the work is finished
BorlandDelphi
So many code??
its a simple-one-line method to read/write
i dont know an easier way, but if you do, please share the code. it's always good to learn something new.
Otherwise, please read the site's terms of use Sign in to post your reply or Sign up for a free account.
Similar topics
by: Andras Gilicz |
last post by:
Hi VB fans
I'm working on a relatively large project in VB6 with about a dozen
forms, including graphs, labels, text boxes, etc. The software itself
is actually a flow simulator with more or...
|
by: lduperval |
last post by:
Hi,
I`m trying to do date calculations in three types of time zones: local,
GMT and specified. The issue I am facing is that I need to be able to
specify a date in the proper time zone, and I`m...
|
by: brian kaufmann |
last post by:
Hi,
I had sent this earlier, and would appreciate any suggestions on this.
I need to make calculations for unemployment rate for three different
data sources (A,B,C) for many countries and age...
|
by: John M |
last post by:
Hi,
I've been coming up against a failure of a report to display the result of a
simple calculation. I have realised that this calculation cannot take place
unless the field I am working on is...
|
by: SJM |
last post by:
There is a database which has combo boxes to allow users to select values
from pre-set lists of common specifications. The form allows users to enter
values that are not in the dropdown lists....
|
by: James Scott |
last post by:
Hello,
I was wondering if there is a package out there, that allows to convert a
date into an int-Timestamp (accuracy needed: 1 sec) and maybe provides some
basis time calculations.
...
|
by: Sanjay |
last post by:
Hi,
Is it possible to save all the names/values of a form to another memo
textfield before a Insert to the database then when required on another page
split that memo textfield into the name and...
|
by: Josetta |
last post by:
Access 2003
I've been experiencing some problems with my "monster" database the
last couple of days. I imported all objects into a new database
yesterday, which pretty much stopped the crashing...
|
by: msanger |
last post by:
Hi,
I have several excel sheets in Office 2007, which has all kinds of standard calculations, and a consolidated Excel Sheet with totals and rollup of all the other excel files. The issue I am...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |