If the value in txtDueDate.Text is a Date then it will convert it to Date and immediately return it (Note that the commands following the Return statement will not be executed).
If the value in txtDueDate.Text is not a Date then it will return #1/1/1900#, the Date representation of jan 1 1900.
I am pretty sure that VBStarterKid wants to achieve this:
- Tim (last purchasedate 13th Sept)
- Kris (last purchasedate 12th Sept)
- John (last purchasedate 12th Sept)
- Fred (no purchases)
- Roy (no purchases)
To order by purchasedate, he simply had to include it in the select statement.
But...
For your first problem you should handle the DefaultValuesNeeded event of your datagridview.
In there you can set
e.row.cells("corr_KundenNr").Value = TopKNNR.Text
Every time you click anywhere on the final row (NewRow) in your grid, this will be triggered, very handy for default values.
No...
You don't have to post that 3 times in a row :rolleyes:
Just look at the very first post in this thread, the link to VB.NET 2003 samples is right there.
Welcome to the forums
About the first question: Anything special happening in the Form_Load event of your main form?
The answer to the second question about the hyperlinks:
I presume they are LinkLabels?
Double click a hyperlink in the Designer and put this code in the LinkClicked event...
I would personally prefer txtAnyDescription over anydescriptionTextbox though.
If you want to type the name of a control but don't know the exact name, you will almost certainly know by heart if it's a textbox (txt) or combobox (cbo) rather than if it's name starts with 'description'... or was...
I googled around a bit and probably since iTunes version 7.10 came out, there is that loader lock problem.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1353717&SiteID=1
Only solution for now is to close iTunes while debugging or turn of the Loader Lock check via "Debug -> Exceptions...
What do you mean by "calling" a button then? just focusing it?
Then use Button9.Focus()
Or is Button9 a control that is supposed to be created at runtime?
cjard is right that it's better practice not to use string comparison with dates.
Suppose your program runs on an other pc with its international settings set otherwise than yours, for example his date will be represented as "13/12/2006" where yours is "12/13/2006".
String comparison could...
Put this method in your code, you can handle other keystrokes with it too without having the focus be on a specific control
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
If keyData = Keys.Delete...
Where exactly does the error occur?
I don't see anything wrong at all at first sight (except for the missing closing bracket in the last line, but that's prolly copy paste problem)
What comes after your code; how do you execute the command?
What is the exact error?
Did you Add all the necessary References to the project?
- CrystalDecisions.Windows.Forms
- CrystalDecisions.CrystalReports.Engine
etc...
We might narrow down the problem if you stepped through the code while running to see on what line the error occurs exactly.
Anyway, Google gives a lot of hits on that error:
Possible causes:
http://www.adopenstatic.com/faq/80040e21.asp
If none of that helps locate the problem then...
' Create Instance of Connection and Command Object
Dim techConnection As OleDbConnection = New OleDbConnection(strConn)
Error probably occurs here? Could you check with breakpoints?
If so, how and where is variable 'strConn' initialized?
That's weird? no errors and visible is set to true yet you don't see it.
Go to task manager and close all excel.exe's, then put everything from line
oXlBook = oXlApp.Workbooks.Open... (this one also in comment)
to
Y2 = oXLSheet.Cells.Item...
in comment
and try again, you should at least now...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.