vb5prgrmr 143 Posting Virtuoso

Actually if your database was normalized "correctly", it would be just 12 to 16 bytes to keep a reference to the sent mail, and when deleted from the sent items, you would only be changing 4 bytes to remove the reference. Then if the message was deleted from the reciepients mail box also, as in no more references to hold the mail, is when you would recover those resources. Meaning the message deleted and the reference to the message from both the sender and reciever are deleted.

*"Correctly" Normalization can take many forms and is therefore a subjective term so please do not take the above as a derogatory statement. What can work for one application may not work for another and my thoughts/ideas on this subject could very well not work for this application. Also, depending upon the actual field type of the database it could be 24 bytes and a change of 8 bytes, that is if still on a 32 bit machine as it could also be double on a 64 bit machine, meaning 24 bytes to 48 bytes...

vb5prgrmr 143 Posting Virtuoso

You can also get the username like so...

Debug.Print Environ("USERNAME")

However, Andre's method is preferred in a lot of cases...

Once you have the username, you can then check for the existence of the desktop by building the string yourself, but the path you are specifing you will not be able to access unless virtualization takes over. To get a path, see...

http://www.codeitbetter.com/how-to-get-the-desktop-path/

or to get the path you are talking about, see...

http://vbnet.mvps.org/index.html?code/shell/desktoplink.htm

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

What you are talking about is a word I coined a few months back and that is Necroposting...

Necroposting has been discussed before and the current suggestion or last suggestion to prevent this is, if the last post is greater than 30 days old do not show edit field but instead show closed statment. Now, I would like to alter that close statement so it has a start a new thread button and link back to this thread so when it is pushed, the title is filled in for user who can change it, and there is a in reference to this thread filled in for user in the edit box. Also, if the last post is between 30 and 90 days old, only the OP can resurrect the dead...

Presently, report the necroposting and or highjacking if such is going on and request the new post be split from the old post and put into a thread of its own...


As for your sig, I hate bugs, you gotta love this one... :)

Nick Evan commented: It's not a bug, it's a feature :D +0
Lusiphur commented: Nice 'feature' :twisted: +0
vb5prgrmr 143 Posting Virtuoso

Well you need to error check for empty text boxes and if = to vbnullstring then textbox.text = "0.00"...

I forget, is column zero based or 1 based???

Good Luck

vb5prgrmr 143 Posting Virtuoso

Make the date a string...

...dDateField = '" & Now & "'"

Good Luck

vb5prgrmr 143 Posting Virtuoso

Andre, if you look at our codes... they are almost the same :) Just mine does it with one line...

Now lets talk about the differences between your code and mine...

First up, the help file information...

Val Function


Returns the numbers contained in a string as a numeric value of appropriate type.

Syntax

Val(string)

The required string argument is any valid string expression.

Remarks

The Val function stops reading the string at the first character it can't recognize as part of a number. Symbols and characters that are often considered parts of numeric values, such as dollar signs and commas, are not recognized. However, the function recognizes the radix prefixes &O (for octal) and &H (for hexadecimal). Blanks, tabs, and linefeed characters are stripped from the argument.

The following returns the value 1615198:

Val(" 1615 198th Street N.E.")

In the code below, Val returns the decimal value -1 for the hexadecimal value shown:

Val("&HFFFF")

Note The Val function recognizes only the period (.) as a valid decimal separator. When different decimal separators are used, as in international applications, use CDbl instead to convert a string to a number.

So what does this mean???

It means that the OP's values of 1,250.00 + 3,500.00 + 2,100.00 would result in an answer of 6.00 instead of 6,850.00 but lets check to make sure...

Standard exe project, add 4 text boxes (Text1-Text4)... add code...

Option Explicit

Private Sub Form_Load()
Text1.Move 30, 30, 1500, 315
Text2.Move …
vb5prgrmr 143 Posting Virtuoso

Yes, that is a DSN Less connection string. One suggestion... On Error Go To Err... Err is the Err Object... Perhaps Change to On Error GoTo ErrHandler... That way there is no confusion as you can see by your code err does not capitalize when you go err.Description...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Try...

Text4.Text = Format(CDbl(Text1.Text) + CDbl(Text2.Text) + CDbl(Text3.Text), "#,#.00")

Good Luck

vb5prgrmr 143 Posting Virtuoso

>DTPicker1.Value.Tostring

Where "Tostring" is most definitly .NET syntax as VB6.0 does not support such a statement...

and this will raise an error if OP tries to copy/paste such code...

So Shame, SHaME, SHAME, on you... :)

vb5prgrmr 143 Posting Virtuoso

Andre... .NET code in the classic section??? Shame on you :)

vb5prgrmr 143 Posting Virtuoso

Good info Andre but the OP is asking about ODBC DSN's, and I agree with you, using ADO's DSN Less connection strings would be the best bet in a situation like this but what you did not tell the OP about is exactly what they would have to do to use an ODBC DSN...

jhai, to use an ODBC DSN for what you are talking about, you will have to go to each machine where your software is to be installed on and create the ODBC DSN... YES You will have to create an ODBC DSN ON EACH COMPUTER! That is if you still insist on using and ODBC DSN and not use ADO's DSN Less connection string... However, if for some reason you must use and ODBC DSN, you can actually create one with a few API calls to add some information to the registry... BUT you better have the dlls on the machine that you are going to be pointing to...

Here is some more info on creating a ODBC DSN as part of your program...
http://support.microsoft.com/kb/171146
http://support.microsoft.com/kb/184608
http://support.microsoft.com/kb/123008/EN-US/
http://gallery.technet.microsoft.com/ScriptCenter/en-us/635ff2a1-4188-4664-8cd8-4bd3bf832592


Also, if you search the registry for say a system dsn, you will find some entries within and if you follow those entries (and make notes along the way), you should be able to create an ODBC DSN by direct calls to the registry... Did you know that ODBC DSN's do not need to be …

vb5prgrmr 143 Posting Virtuoso

Why do that when you can do...

Form1.Command1.Value = True

from form2

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well as I have advised others in the past... I suggest that you get out the ole Mark I recording devices (pencil and paper) and write down you data requirements. Normalize your requirements. Then design your interface...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Kin, please reread this thread...

vb5prgrmr 143 Posting Virtuoso

Looks like you have it... Only need to add single ticks around strings and since both of your fields are numeric, I think you have it...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Follow the two links in the last post of this thread http://www.daniweb.com/forums/thread293210.html

Good Luck

vb5prgrmr 143 Posting Virtuoso

Here is one of those pages you should have turned up in a search...

http://www.xtremevbtalk.com/showthread.php?t=102959

and another...

http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/


Good Luck

vb5prgrmr 143 Posting Virtuoso
Form1.Command1.Value = True

Good Luck

vb5prgrmr 143 Posting Virtuoso

Not a problem :)

vb5prgrmr 143 Posting Virtuoso

Start a new project or open an old one. Open the API viewer. Select an api you want to find out about. Switch back to VB. Press F1. On index tab of the MSDN help file, type in the API name. Read all about it...

vb5prgrmr 143 Posting Virtuoso

How can we help you if you don't show us the code that is giving you a problem?

vb5prgrmr 143 Posting Virtuoso

Okay WaltP. The reason you are not retrieving any possible error that has been raised is because of your code and error handling. Please see comments I made to your code below...

'good, a well defined error handler label definition
On Error GoTo mkError

'side note: any text box can make a dir?
MkDir txtDir(Index).Text

'now here is where you tell the system that any error handler is disabled
On Error GoTo 0

'exit current sub so error handler is not executed if there is no error
Exit Sub
mkError:

'and here you say the same thing to the system, disable error handler
On Error GoTo 0

'which of course resets the error object and thus you don't return anything when you 
'do encounter an error (ALSO: Concatination of strings in VB6.0 uses the & character)
Text1.Text = Str(Err.LastDllError) + " "
Text1.Text = Text1.Text + Str(Err.Number) + " "

So what I would do, is to remove your line 7 on error goto 0 statement and you should be able to retrieve your error info. Also, you can reduce the amount of errors your recieve by checking to see if the directory exists with the Dir Function prior to trying to create it...

Also:

Exit Sub
mkError:

If Err.Number = 75 Or Err.Number = 76 Then
  'handle these here
Else
  MsgBox "FormModuleName.SubFunctionName " & Err.Number & ":" & Err.Description
End If

End Sub

Good Luck

vb5prgrmr 143 Posting Virtuoso

Use your friends (yahoo, google, ask, answers, bing) and search for vb6 game tutorial and don't forget http://www.planet-source-code.com

other search terms

vb6 chat
vb6 game tutorial
vb6 graphic tutorial
vb6 ado tutorial
vb6 tutorial
vb6 faq


Good Luck

vb5prgrmr 143 Posting Virtuoso

As I said, I don't see where you set tatts = to anything. In VB6.0, you can turn all of your text boxes into an array of controls and I mention this because that looks like what you are doing. In VBA and VB you could do something like...

Dim C() As Control
Redim C(0) As Control
Set C(0) = Text1
ReDim Preserve C(1) As Control
Set C(1) = Text2
'and so on

and it is this, that I do not see you do. I don't see where you set tatts = control... thus I believe your error...

Good Luck

vb5prgrmr 143 Posting Virtuoso

In VB6.0 we would use something like screen.width and screen.height, but for VBS? Don't rightly know off hand...

Good Luck

vb5prgrmr 143 Posting Virtuoso

First off, UserForm1 denotes that you are using VBA and NOT vb6.0 so in the future you might want to search out VBA forums...

Second off, you could use a loop or two to cut down on the amount of code you have...


I have a few more comments but will leave them to those that are more experienced with VBA but I will say that I did not see where you set the variable Tatts equal to the controls it is to be associated with...


Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, I think you should look at your click event of that button before you go adding if text2.text<>"" and text3.text<>"" then leave text4 alone because it sounds like your problem is in there...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Time to use your new best friends... and I'm talking about yahoo, google, ask, answers, and bing. These various search engines can find you so much example code, you could not shake a stick at it even if you did have all day. So what you need to search for is vb6 drag and drop tutorial. Why vb6 as part of your search you ask, well it is so that you can filter out some of the vb.net examples that are out there because vb6 and vb.net are two different animals. You could also use -.net to filter out even more but some sites have both classic vb6.0 examples and vb.net examples and doing -.net will remove those sites from your results, which might be a bad thing. Also, another site to search for example code is http://www.planet-source-code.com

Good Luck

vb5prgrmr 143 Posting Virtuoso

What you are talking about is the creation and use of class modules or better yet, "Objects"... ie OOD... and while you could do these things with this design methodology, it is a bit of overkill... but with that said, I would also think that to learn this programming methodology, this simple project you are talking about would be a good starting point...

Friends Time (yahoo, google, ask, answers, bing) vb6 class module tutorial...


Good Luck

vb5prgrmr 143 Posting Virtuoso

Oh something like...

strSQL = "SELECT SUM(numericfieldname) FROM tablename WHERE datefieldname >= #" & "01/01/2010" & "# AND datefieldname <= #" & "01/30/2010" & "#"

Now, the above is for access only as SQL server will give you an error if you try an execute the above query. You will also notice that the above is inclusive of from and to dates. To make it none inclusive, ie exclusive, remove the equals signs.

Or you could use the between operator but I will let you look that up in Access help files...


Good Luck

vb5prgrmr 143 Posting Virtuoso

I believe it is because you are missing some parameters in your open statement... the next one after your string should be your connection object followed by cursor type and lock type...

Good Luck

vb5prgrmr 143 Posting Virtuoso

SendKeys is not an API!!! It is a built in VB function that wraps the SendMessage API and to make it work, turn UAC (User Account Control) off or switch over to that actual API SendMessage...

To turn off UAC, expose the desktop and press F1. Type in UAC... follow the directions...

Good Luck

vb5prgrmr 143 Posting Virtuoso

What you are trying to do via VB can be done by the net admin with a few mouse clicks... Then there is the potential that this could be so misused...

vb5prgrmr 143 Posting Virtuoso

Friends time (yahoo, google, ask, answers, bing) vb6 ado tutorial...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, so you have created the ODBC DSN on the target computer and have tested it and it works... So that means that the required drivers are on the machine for it to work... It is pointed correctly to the datasource...

Okay, beyond saying that you need to create an install package and not just copy over your exe,... I'm out of ideas as it sound like you have done everthing right...

Good Luck

vb5prgrmr 143 Posting Virtuoso

It doesn't, unless you tell it! Meaning, create a public sub/function/routine that accepts what you want to pass as a parameter. As for reusing a form...

Dim F As Form1
Set F = New Form1
Load F
F.MyPublicSub "MyStringToPass"
F.Show

Good Luck

vb5prgrmr 143 Posting Virtuoso

The conjecture of why M$ droppped VB6.0 and their soon to be released but never was VB7.0 in favor of the new .NET technologies that has been resisted every step of the way by some and embraced by others...

vb5prgrmr 143 Posting Virtuoso

There are controls and other things that you can buy, but most of them are meant for actual programming languages... Have a search with your friends (yahoo, google, ask, answers, bing)...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Specify the path in code and not properties at design time. In code, use M$ rules for newer OS's when installing program and running program on other computers. See http://www.vbforums.com/showthread.php?t=456795

Good Luck

vb5prgrmr 143 Posting Virtuoso

Yes we can, show us what you have so far, tell us what you want to do, where are you having problems?

vb5prgrmr 143 Posting Virtuoso

asaness, did you even read this thread? I already pointed the OP on how to find an ADO, RDO, DAO tutorial...

vb5prgrmr 143 Posting Virtuoso

Friends time (yahoo, google, ask, answers, bing) vb6 file properties and with this search you should also run across dsofile.exe of which you can ignore because that is for office documents. But in the end, you will find that there are several ways in which to do this, including...

http://www.vbforums.com/showthread.php?t=557389&highlight=properties

the API...

and there is another one around here somewhere that uses Microsoft Shell Controls and Automation but I cannot find it and I'm tired of looking for it as it has been 2 hours now...

Edit: Found it... http://www.codeguru.com/forum/showthread.php?t=324023

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, so you have posted an API. The SendMessage API, which is one of the most widely used and versitile API's but I don't see where bolding or something in bold is demarked. So, what is your question?

vb5prgrmr 143 Posting Virtuoso

Time to use your friends (yahoo, google, ask, answers, bing) to search for vb6 ado tutorial or look at the pinned threads of this forum...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Did you test the ODBC DSN? Did you name it correctly? I mean exactly the same name as there may be a space in the name...

Good Luck

vb5prgrmr 143 Posting Virtuoso

All of that can be done in VB6.0, why deal with .Bloat?

vb5prgrmr 143 Posting Virtuoso

Check out the DateDiff function for testing the date.

Use an Update Statement to increase the value by one or to set the field to the correct value.

Flash is not VB so I couldn't tell you. Hopefully someone can come along and give you an answer...

Good Luck

vb5prgrmr 143 Posting Virtuoso

If you create a ODBC DSN for your connection on your dev machine, you must create it on the target machine...

Good Luck

vb5prgrmr 143 Posting Virtuoso

ak, do you realize that this thread is almost a year old???