vb5prgrmr 143 Posting Virtuoso

I don't know where you found your information that printing to tiff is a sepeate piece of software that you need to operate, because my searches "windows print to tiff" and "tiff print driver" both found tiff printer drivers for windows that "ANY" software can print to just as if it were a HP or lexmark printer...

and yes it is possible...

1st) Download and setup tiff printer driver and make it the default printer driver..
2nd) shellexecute API with "print" verb the *.pdf file in question
3rd) Download and setup if needed WIA 2.0
4th) Use WIA 2.0 to open and display tiff image in picture box

Good Luck

vb5prgrmr 143 Posting Virtuoso

You just need the IP address...

Good Luck

vb5prgrmr 143 Posting Virtuoso

ShellEddie, it is not nice to highjack someone elses thread as you have done...

Your problem, if you are using ADO, is more than likely your connection string, so go over to http://www.connectionstrings.com to correct yours. Now, if using DAO, that is your problem, DAO does not recognize the database format above 2k...

PS. I'm flagging your post as a bad post because of your highjacking. In the future, if you need to reference someone elses thread, or an older thread (called necroposting), copy its URL into your brand new thread...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Were not going to do your work for you!!! If you want someone to do your work for you go over to http://www.rentacoder.com or http://www.odesk.com and place your project up for bid, else see post #4 above...

vb5prgrmr 143 Posting Virtuoso

Time to get out the ole Mark I recording and documentation device (Paper and pencil!) and sit down to figure out your requirements. I would suggest that you start with the design of the database and then move onto the programming requirements...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, I looked over your Form12, as it was the startup object, and it seems to work for me...

In that, if I put a part number in that does not exist, it gives the the correct error, and if I use a good part number, it displays a quantity of 1 in the grid and 7 in stock. I also changed F1010 to a quantity of zero and recieved what I believe to be the correct error message but I would say you need to add a little more information to that msgbox.

So at this point, everything seems to work okay but you say you are getting a runtime error... What is the error number and err.description?

Note: To make it easy to retrieve this information, you should put error handlers in all of your subs and functions... Something like this...

Private Sub Form_Load()

On Error GoTo Form_LoadError

'your code goes here

Exit Sub
Form_LoadError:

MsgBox "Form12 Form_Load " & Err.Number & ":" & Err.Description

End Sub

Good Luck

vb5prgrmr 143 Posting Virtuoso

Not a problem. Just so you know, there is a setup project where vb is installed that allows you to customize the PDW. If you decide to alter this code, be warned that you should make at least two backups, one for alteration, and one for being able to reset as where it is located is the source for the PDW. Also, you could upgrade to the Windows Installer 1.1. See the top pinned thread in this forum for where to download it.


Good Luck

vb5prgrmr 143 Posting Virtuoso

If right clicking on setup.exe and do a runas admin does not work, then your best bet is to upgrade your installer to windows installer 1.1, see the pinned link of snippets at the top of this forum for where to download, or you can use inno.


Good Luck

vb5prgrmr 143 Posting Virtuoso

If...Then, Select Case, ElseIF are condition statements found in any language and thus are not intrinsic to vb as they are code branches based upon conditions found withing the code that, no matter what language is used to derive these branches, when compiled they should all be the same, or nearly the same. While on the other hand, Dir, Instr, Mid, Trim, Left, Right, UCase, LCase, GetSetting, SaveSetting, and so on are intrinsic to VB and are interpreted by the VB runtimes. And finally, the API, as I understand it, circumvents the vb runtimes and communicate with the dll in question directly.


Good Luck

vb5prgrmr 143 Posting Virtuoso

Think arrays, and think a single control for each letter... Then use your friends (yahoo, google, ask, answers, bing) and search for vb6 hangman to find some actual example programs...

Good Luck

Nick Evan commented: Sounds like solid advice to me :) +12
vb5prgrmr 143 Posting Virtuoso

Those pictures don't tell me a thing... We need to see the code to be able to help you...

vb5prgrmr 143 Posting Virtuoso

I know the effect you are looking for, and I know how to accomplish part of what you want if I interpret "over" correctly. Meaning, you don't want to draw to the form that is displayed, instead, you want to use transparency on another form and have the text hover either over your form or even the desktop or another program. And if that is not what you mean by over, but instead mean that you want the text to look like it is hovering over the form and casting a shadow, well I know how to do that also and can easily point you in the write (pun right) direction...

and that would be the call for you to use your friends (yahoo, google, ask, answers, bing) to search for the following...

vb6 form transparency
vb6 region transparency
vb6 text drop shadow
vb6 floating text

and search for form over at planetsourcecode.com after you select visual basic and set up your search preferences or else you will end up with a bunch of .net code that will be meaningless to you...

However, the actual animation of writing something out, well I have never tried that before, nor have I seen anyone else do something like that. But I have seen examples that mimic as if someone was typing...

Now, I do know of a way that this could be accomplished with the above code you will find with those …

vb5prgrmr 143 Posting Virtuoso

Adodc1.RecordSource = "select * from marks where roll = " & troll.text 'will work now....

Also, in the future, do not necropost or highjack a thread as you have done both here. Instead, if you need to, copy the older threads url into your brand spanking new thread as a reference...


Good Luck

vb5prgrmr 143 Posting Virtuoso

Use the common dialog control... (Friends time (yahoo, google, ask, answers, bing) vb6 common dialog tutorial)

Good Luck

vb5prgrmr 143 Posting Virtuoso

Actually, any intrinsic function to VB will require the runtime, however, the use of the API will not as I presently understand it. But your problems can be solved by simply using the PDW or some other installer...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Don't really need the pic, just the code but if you use the Go Advanced button you should be able to attach a pic...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well you know what!!! Instead of me trying to write this for you in the blind, how about you first post the code you have for loading the grid in the first place and we will work from there...

vb5prgrmr 143 Posting Virtuoso

Your going to go D'oh here in a moment :) ...

An autonumber is a number and not text so when quering against a number you do not wrap it with single ticks (')...

Good Luck

vb5prgrmr 143 Posting Virtuoso
strSQL = "SELECT * FROM tblWhatever WHERE quantity > 0"

Good Luck

vb5prgrmr 143 Posting Virtuoso

Without seeing your code, it is hard to imagine what you are talking about... and perhaps a better explanation of what you are trying to accomplish might be in order...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Not quite sure what you are trying to say but I think you want to keep the state of something between instances of your program running and if so then you should check out getsetting and savesetting...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Not a problem, now if you don't mind could you please mark this thread as solved... thanks

vb5prgrmr 143 Posting Virtuoso

manual, time to use your friends (yahoo, google, ask, answers, bing) and search for vb6 volume control, which should bring you this thread example...

http://www.thescarms.com/vbasic/volumecd.aspx

Good Luck

vb5prgrmr 143 Posting Virtuoso

Close, very close, but add a boolean variable... (Also, since you are not returning anything from this procedure, it can be a sub instead of a function...)

Public Sub readExtFile1(filename As String)
Dim TimeToWrite As Boolean

Then, there are a couple of mistakes in your code we need to correct...

Line Input #nFileNum, sNextLine
[B]sText = sText & sNextLine & vbCrLf[/B]
If [B]text[/B] = "NEW" Then
WriteToTextFile (sNextLine)
End If
Loop
Close nFileNum 'missing something here see below

It should be...

Line Input #nFileNum, sNextLine
  If UCase(sNextLine) = "NEW" Then TimeToWrite = True
  If UCase(sNextLine) = "@NNNN" Then TimeToWrite = False
  If TimeToWrite = True And UCase(sNextLine) <> "NEW" Then WriteToTextFile (sNextLine)

Loop
Close [B]#[/B]nFileNum

Good Luck

vb5prgrmr 143 Posting Virtuoso

Abul, that code does not require a reference...

vb5prgrmr 143 Posting Virtuoso

Okay, you use the word "add" but actually the word would be "subtract" from what you are telling us... Now, please consider this fictitious table...

tblInventory
iInvID
vInvName
vInvDesc
iQty

and lets say it contains your H1010 in the vInvName field with a description of A Blue Widget, and a quantity of 10.

Now, when you sell or transfer these ten items from your inventory, you would update this quantity by say using an update statement...

strSQL = "UPDATE tblInventory SET iQty = [tblInventory].[iQty]-" & variablethatholdshowmanyweresold & " WHERE iInv = " & variablethatholdstheiInvID

Now, you question is, is how to know when the values of iQty changes or what it is? Well when you first pull the data from the database, you know it then. It resides within the recordset that you used to retrieve the information so that is where you would check to see if there is sufficient quantity to subtract from the inventory. Then after your update, you would want to Refresh your recordset so that it will be updated with the latest amounts...

Good Luck

vb5prgrmr 143 Posting Virtuoso

The answer is right there in your code... (when posting code please use the [ code]code goes here[ /code] tage (without the spaces))

rngPage.Copy 'copy the page into the [B]Windows clipboard[/B]

So all you need to do is to look up clipboard by typing it in and pressing F1. However, by using the first word of each page you may overwrite previous pages and/or may never be able to display the pages in the correct order once again. I would suggest that you use the original file name appended with "pg" & format(countervariable, "0000").

Good Luck

vb5prgrmr 143 Posting Virtuoso

Use the common dialog control... use your friends (yahoo, google, ask, answers, bing) and search for vb6 common dialog control tutorial...

Good Luck

vb5prgrmr 143 Posting Virtuoso

If you want just the picture then search the web for print to tiff or tiff printer driver. Set it up on your computer and print the pdf to either a multipage or many single page tiffs. (Those configurations will be found in the documentation of the tiff driver.) Either use the control or the shellexecute API with the "print" verb or do it manually. Go to M$ and download (if you need to) the WIA 2.0 SDK. You will need this to be able to load a tiff image into a picture box on win xp systems and later. If on 2k or earlier you can use the wang/kodak imaging controls.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Walt, no need to understand the header and all, as this can be done with automation...

lamakan, all you need to do is to add a reference to word (project>references) and copy the code you referenced. However, you will need to add a few more variables so that you can open the document in question as the code you referenced is from within word...

Use your friends (yahoo, google, ask, answers, bing) and search for vb6 automating word, vb6 open word doc, or whatever else you can think of to find more examples...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Sounds like you are describing a one to many relationship...

tblMake
iMakeID
vMake 'chevy, ford...

tblModel
iModelID
iMakeID 'foreign key
vModel 'F150, F250, ...

So when user selects make, you would then execute...

strSQL = "SELECT iMakeID FROM tblMake WHERE vMake = '" & variableholdingthetextoftheselectediteminlist & "'"
Set Rs = '...
strSQL = "SELECT vModel FROM tblModel WHERE iMakeID = " & Rs.Fields("iMakeID")
Set Rs = '...

Hope you get the gist...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, so what you are saying is that you have extracted a binary file from sql server and this binary file is a font. Right? Okay then, you will need to save the font to the hard drive and use the API AddFontResource. Then you could do set printer.fontname = fontname or me.fontname = fontname if you wanted it for your current display.

But that will not say that this certain text file will always be displayed with this certain font... Text files only hold text. No formatting, no special characters, nada!

So, if you are using edit in dos, I'm not sure that it uses anything other than the system font for display. Unless you have some sort of fancy dos editor that allows you to select fonts...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Place picture box on form, size it, select control from toolbox, and draw it into the picture box.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well considering that you are using a binary file to store data in you might need to open the file as binary. Then read the file or part of the file in that you need and then strconv it from vbfromunicode, but it is hard to tell without seeing your code or data...


Good Luck

vb5prgrmr 143 Posting Virtuoso

You want code? GoTo odesk.com or rentacoder.com and put your project up for bid. Don't want to pay? Use your friends who miss you so much! (yahoo, google, ask, answers, bing) Search the world wide web as your answers are out there... The only problem is, is that you have to do the work and don't forget about searching planetsourcecode.com...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well a picture box is meant to hold graphics while the adobe acrobat 7.0 browser control type library 1.0 will allow you display pdf files... So are you wanting to put this control into a picture box, or are you wanting to use one of those print to Tiff drivers to print the adobe pdf via the shellexecute API with the "print" verb and then use WIA 2.0 to load and display the output in a picture box???

Good Luck

vb5prgrmr 143 Posting Virtuoso

kw2k9, just so you know, DAO is faster than ADO when it comes to the older access databases and when using DAO to access certain blob/memo type fields you do not need to use the getchunck method that you would have to do with ADO to get the contents of one of those fields...AND DAO can access any kind of database that ADO can via ODBC Direct! Just so you know...

ALSO, RDO is faster and more reliable than ADO also... Since ADO is a wrapper for both DAO and RDO and thus is slower as it adds another layer of calls...

Just so you know... :)

vb5prgrmr 143 Posting Virtuoso

What is the error? (err.number and err.description please)

Variable not defined??? mypath is not declared as a string as far as we can see so add Dim MyPath As String. Same goes for MyName...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Switch over to ado or save the 2k2 database in a previous format 2k or 97...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Your friends have the answer... (yahoo, google, ask, answer, bing) vb6 ado tutorial...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Set autoredraw = true for the pic box. Use the Join function for the output, and change your comments on the split line where you split on the dash as your comment say to split on a space...

Good Luck

vb5prgrmr 143 Posting Virtuoso

In design view, double click on the toolbar so it will open up to its default event in the code window... From there you use the arguements passed to this event to determine which button was clicked...

Good Luck

vb5prgrmr 143 Posting Virtuoso

You/They could use ShellExecute API to launch the default webbrowser or you/they could include the webbrowser control...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well, maybe you did but with my age and the memory faults I get... :)

Once again, without seeing your code it is hard to tell...

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

Don't know what to say??? But I am wondering why your vbp file is pointing to program files for some of your references instead of system32 but then again that may be normal as I don't look at the contents of them every day... Best bet is to start all over and just copy the code from old to new...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well without seeing the insert into query or the structure of your tables it is kind of hard to tell and we would only be taking shots in the dark...

So now, what you are saying is that you know for sure that there are 19 rows not getting inserted... are you sure? Do a select count on the origin table to make sure because if you are just using the autonumber for your count, you may be wrong. Also, do you have a where clause?

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, it is helpful if you also include the description of the error that you recieve as most of us do not remember the number but the statement...

In this case it is Object variable or with block variable not set...

Which means, you have an undeclared variable somewhere or have not set it correctly. Meaning...

Dim adoRs As ADODB.Recordset
Set adoRs As New ADODB.Recordset 'missing this somewhere...

or you are missing something like that...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Not a problem, now if this is solved could you please mark it as so...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well there are several ways in which two programs on different machines can communicate.... There is DCOM, MSMQ, a modified chat program, and a few more ways that can be found with a little research but those three should keep you busy for a few days...

Good Luck