Thats absolutely brilliant, I will be able to add that to the bit I have already got and with a little bit of 'tweaking' almost make it 'idiot proof'
You have certainly used some 'hi-tech' expressions that I have never come across before, so I can't thank you enough
User Profile
Collapse
-
My apologies for not replying sooner but I hadn't realised there was a reply to my query before the project was pushed 'to the back burner' by other works
I have had a look at the little program you did but am puzzled as to where the original text comes from, can I insert it from a file?Leave a comment:
-
miroku800 started a topic I have a program that prints a text file from notepad at the press of a buttonin Visual BasicI have a program that prints a text file from notepad at the press of a button
the resulting printout looks like this
1,blue,12345678 ,54
2,red,00001234, 6
3,blue,12345678 ,63
4,blue,12345678 ,65
5,red,00001234, 17
Is there any way to format it into columns and then print it so it looks like this
1,-----blue,-----12345678,-----54
2,-----red, -----00001234,-----6
3,-----blue,-----12345678,-----63
4,-----blue,-----12345678,-----65
5,-----red, -----00001234,-----17... -
-
Oh yes please
Its many years since I had to program in VB and am having difficulty in getting back into it and am having to dig out the reference books
the DOS file is called RAFFLE.EXE
and the text file (that the program produces automatically) is called RAFRES2.TXT
Its very kind of you to provide this help and it is much appreciated
PS. the Txt file could be made to print automatically without the button...Leave a comment:
-
-
can anyone help me with a temporary fix
Hello
I have an old Pascal program that runs in a DOS box that runs a 'one time' result to a txt file (the program is being slowly rewritten in a more modern language but I need to use it occasionally meantime)
Is there any way I can start it in VB6 then just use the program in its DOS format and have the .TXT file sent to the printer when the 'go' command is given
The DOS program works fine in Win XP... -
Is there a way to...
In VB6 is there a way to provide a series of text boxes (4) in a row for data entry according to a preset number previously entered IE.
a text box requests entry of a number corresponding to the number of lines of data to be entered (Max 20) and the appropriate number of 'lines of boxes' appear on screen ready for the data to be entered, so if 3 was entered then 3 sets of boxes appear and if 6 was entered then 6 sets of boxes appear
... -
sorted it
and thought people might be interested the error was caused by a mismatch of the name in the print_report name and the access report nameLeave a comment:
-
Has anyone come across error 2301 when printing
I have a visual basic 6 program that prints about 30 different reports from an access database on command but 2 or 3 of them fail to print with a message box stating 2301 and the report name and an OK button.
When you press OK the program 'bombs'
the report prints quite happily from access itself and i am completely stumped
the code is nothing more than
Private Sub Command1_Click( Index As Integer)
... -
That would be fine if it would just skip the update cos it will try and update as soon as someone looks at another score which is very frequently
The problem is it won't skip if it can't update it just 'bombs'
all I need to know is how to make it skip on finding the lock file...Leave a comment:
-
I am now totally confused!!!
Surely if (C) can check for a 'mark-file' it could check for the presence of the 'lock-file' and just skip the copy if its there?...Leave a comment:
-
I wouldn't like to have to rewrite it but could certainly modify part of it, as i said at the start 99% of the time its fine but just occasionally it bombs.
The copy only takes a couple of seconds anyway (it is a finite database as it is only used once a year for one 4 day competition and is cleared back to zero at the end ready for next year)...Leave a comment:
-
No you were right the first time it is copying one database file but it doesn't matter which way i do it if it finds a lock file then it 'bombs' (and I must admit its only now and again) but I cant even make it restart automatically as it asks for a password to close it down so that the competitors cannot shut it down...Leave a comment:
-
Thats exactly the problem when it finds the lock file it crashes the program.
I need to find a way for it to skip the update when it finds the lockfile
Many thanks for the replies so far, keep them coming...Leave a comment:
-
possibly need a way of error trapping
I don't know if this should be here or in an Access forum but here goes
I have a VB6 program that uses an access database to record competitors and scores from a competion this works fine and i will call this database (A)
after each update is made database (A) copies itself to a preset location which I will call database (B)
so far everything is fine
at a remote location there is another... -
Dont know if this could be the answer but I had a problem very similar and I discovered that my version of VB6 required service pack 1 before it would utilise databases properly.
I only discovered this as a program written at work was fine but the same program at home had the problem and by comparing both setups found that work had been serviced packed and mine hadn't
Just a thought which could be totally wrong but worth a look...Leave a comment:
-
How to copy a database?
A little history
I designed a program in VB6 which used an access database with the aid of a then workmate (who has now moved on and lost interest) which was in two parts. A master program and a remote viewer.
Now the problem
the master program is working fine and has provision to make a copy of the database to a second location and updates its master database and copy no problems
the remote viewer also works in... -
using information from a textbox
Hi All
Its such a long time since I did any VB programming my mind has gone blank (or I am getting too old and senile) can anyone point me in the right direction!!
I am trying to get a program to give the opportunity to select a database file to use, I can get the filename into a text box from the common dialog but how do I get it from there into the program.
At the moment the program looks in a specific location
Appath/files/database{year}. mdb... -
Thanks for that, I see how it works.
Now all I have to do is get the result from the common dialog to be read by the programLeave a comment:
No activity results to display
Show More
Leave a comment: