|
Hi.
Can anyone offer some assistance with creating an invoice in vb express 2005. perhaps some code examples etc.
i looked around and can find example like richtextbox printing etc.
Thanks.
Robbo
|
|
|
|
|
Hello to all, I am a newbie with the visual basic language and i am currently building a small application for my company to edit a specific part of a database. I am using the ado data control for this and i have everything functioning expect for my delete button, thing is it works but it only deletes one record from the field whereas i would like it to delete all the records in the field that match the data in a text box that data is entered into by the user. Please any help would be appreciated, i've been fighting for weeks with this. I even tried using sql queries and they fail me as well, cause my delete command doesn't seem to work. Feel free to ask questions if i haven't made my self clear enough. Thank you.
|
|
|
|
|
govagedon wrote: but it only deletes one record from the field whereas i would like it to delete all the records in the field that match the data in a text box that data is entered into by the user.
What is the SQL query you are using?
|
|
|
|
|
Hi there.
There is many ways to identify data to be deleted. You can either delete data from x Value to y Value or with wildcards (*) or specific data only.
Here is some samples
DELETE * FROM Table WHERE ColumnA = Value1 AND/OR ColumnB = Value2
DELETE * FROM Table WHERE ColumnA = LIKE '%Value1' -> String Type Data (wildcard method)
DELETE * FROM Table WHERE ColumnA BETWEEN Value1 AND Value2
Hope this is helpfull
Regards, Werries
A programmer's life is good... or is it?? Ek dink nie so nie!
|
|
|
|
|
To chandram i've used sql queries similar to the ones that Werries has posted. And very time i try to move to the next line when i finish typing it in i get this error "compile error, expected expression" and it highlight the asterik. If i try the "delete from" command" it hightlights my table name and give the same error.
Here's the code i've wirtten
<pre>confirm = MsgBox("Are you sure you want to delete these records", vbYesNo, "CAUTION")
If confirm = vbYes Then
delete from pay_payment_history02 where process_we_date= like 'we_date.textbox'
MsgBox "Records Deleted", , "Message"
Else
MsgBox "Records not deleted", , "message"
End If</pre>
pay_payment_history02 = table name
process_we_date = field name
we_date.textbox = text box where the user selects the date to be deleted from the datafield.
Thanks for the help Werries your welcome to give any more advice if you have i'm looking for lots of it, like i said i'm new at this.So its sort of like a practice program.
|
|
|
|
|
govagedon,
Check with this sql statement
delete from pay_payment_history02 where process_we_date= like '" & we_date.textbox & "'"
This we_date.textbox is a variable you have declared in VB6/VB.Net. I hope this would solve your problem.
Regards,
Manowj
|
|
|
|
|
hello manowj,
i inserted the statment into my code, now i've encountered another error. Vb gives me the following error, "compile error, syntax error" then when i click ok it highlights the entire line of code you gave to me. any idea as to why that may be happening?
Thanks,
govagedon
|
|
|
|
|
I am using VB 2005 Express Edition and i am trying to deploy my porgram and i can publish it with no problem but when i go to run the program outside the VB environment it crashes. Anyone can tell me or direct to a sort of step by step so i can make sure i did it right?
thanks
|
|
|
|
|
Crashes with what error message?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Is the .NET framework installed on the target machine ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Swisher24 wrote: I'm having issues can anyone help?
And those would be ......?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Still not enough information. What error messages are you getting? Also, you typed the code into your post - DON'T. ALWAYS copy and paste your code into your posts here. It saves us from chasing down bugs you typed in here, but didn't type into your actual code.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Last time I'm going to ask - What's the exception and on what line of code does it show up? Copy and paste the code where the problem shows up! There is NOTHING anyone can do to help you unless you do this...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
You haven't read either of my last 2 posts, have you?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Don't even bother with it...
-- modified at 14:21 Friday 22nd December, 2006
Swish
|
|
|
|
|
How on earth do you expect anyone to help you if you don't tell them what the error is or on what line code it happens on or what the REAL code looks like? The stuff you originally posted wouldn't even compile and there were "substitutions" where you just look the liberty of removing the code, like your SQL Insert statement...
You already had the correct pieces in place, so telling you to load the data into a DataSet and write it to your database was pretty much pointless.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
You didn't get it when I said I was "New" to this, so being new doesn't mean that I already know what to do or what to say. Thats why I asked for help. So let it go...
Swish
|
|
|
|
|
I told you what we needed a few times, so that's no excuse for not listening.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
And then he starts deleting posts, and screwing up the boards.
I hate to sound like an old man, but I don't recall people acting this entitled, or getting uptight when help doesn't come in the way they hoped, when I was starting out.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: I hate to sound like an old man, but I don't recall people acting this entitled
That makes two of us. Oh, crap! We are getting old!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Swisher24 wrote: You didn't get it when I said I was "New" to this, so being new doesn't mean that I already know what to do or what to say. Thats why I asked for help. So let it go...
Look don't get uppity with the people here. We try and help out in our free time out of good will. We are not paid for this and we don't have to give help. However, it is obvious that you did not supply the information that it would take to answer your question. We, and specifically Dave in this case, are trying to help you. If you didn't know how to get at the information then ask that. Don't delete your posts in a huff and tell people to forget it. They've taken time out from doing something else to help you.
You can always go to Microsoft support for help. They will help you do whatever you like for a small fee.
|
|
|
|
|
Swisher24 wrote: so being new doesn't mean that I already know what to do or what to say.
Knowing how to ask a question is common sense. Knowing how to ask after someone guides you is a matter of being able to read. We're here to help, but our help is free, you're not in a position to complain if we fail to read your mind, or if we try to help you understand what we need in order to provide an answer.
And, if you're not able to work out how to answer a question, perhaps your understanding of the code you're writing is shallow enough that you should take a step back and try to learn some basics. It should be self evident what info is needed in order for someone to be able to help you - a description of the problem, any error messages you're getting, the things you've tried to make it work, and a copy of the code in question.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi all,
I have a question about why the textchanged event for a textbox is fired when I click on the tabs of a tabcontrol?
I am setting a variable on any textbox.textchanged event so that I don't ask the user if they want to save changes if they haven't made any. The problem is when I click on the last tab in the tabcontrol it fires the textchanged event on all the textboxes on the last tab even though I didn't change any text.
Any ideas or suggestions that I can use to stop the textchanged from firing on tabcontrol click?
Chuck Easter
|
|
|
|
|
What version of the .NET Framework are you using? I've never heard of the problem and I can't duplicate it on .NET 2.0. The TextChanged event stays silent. Are you doing an validation on the TextBox's? Are you doing any handling of their KeyDown, KeyUp, or KeyPress events??
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I'm using .Net 1.1. I have the textchanged event code set to set a boolean when the event fires and then I check the boolean on form closing event to see if I need to do a save. I get my messagebox asking if I want to save changes even though I never changed any textboxes.
|
|
|
|