User Profile
Collapse
-
Have you stepped through the code at all? Does it fail at a certain place? -
You would need to surround the date/time with the # sign rather than the '.
Example: AND DateSignIn=#" & yourDate & "#", myConnection)Leave a comment:
-
Proper exit of Excel template
I am opening a template, populating it with data, doing a SaveAs for the new workbook. Then I do a Process.Start(S avedFile) to open the saved workbook. The problem I have is that the template opens when the saved file opens.
What am I doing wrong?
Code:If ReportDirectoryExists(ReportFolder) = False Then MessageBox.Show("Could not save report successfully", "Error Saving", MessageBoxButtons.OK,
-
thanks for the help. Any chance you could help translate this into a SQL statement for use in vb code? The ultimate goal is to produce an error message if the count is greater than 1. Thanks again!!...Leave a comment:
-
query for duplicates
I have a data-entry application which saves records to an Access db. I need to build in a query to search for duplicate entries before a save is performed. There are 2 fields that would generate a duplicate; UserID and WeekEndingDate. If more than 1 record is found for the same combination I want to have a pop-up message saying that the combo already exists. Thanks for the help!!
p.s. - I am coding in vb.net -
as it turns out, the problem was simple. I misspelled a field name in the database and had to remove the single quotes from the SQL. works fine now....Leave a comment:
-
Thanks for the help. I tried adding the trim function but the record did not save and did not error. Any other thoughts?...Leave a comment:
-
Select week-ending date
I need to be able to have my application select the current week-ending date from a listbox.
I have seen some things on the net but nothing that really helps.
If anyone can provide help, that would be awesome.
p.s. - the dates are prefilled in the listbox in mm/dd/yyyy format. -
in .net, maybe try creating a data entry system with query and reporting features.?? just an idea. it would be something similar to what would be asked for in the business world...Leave a comment:
-
if I remove myCmd.Parameter s.AddWithValue( "@Per_Hour_Quot a", txtQuota.Text) then I get an error saying 'No value given for one or more required parameters'.
The error is thrown after Try
myCmd.ExecuteNo nQuery()...Leave a comment:
-
I'm pretty sure the SQL statement is right but maybe not so much with the vb code...please advise if you know better. Thanks!!
Code:Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click Dim strSqlEditRecord As String Dim myCmd As OleDb.OleDbCommand myCmd = Nothing strSqlEditRecord = "UPDATE tblMain SET tblMain.Per_Hour_Quota=
Leave a comment:
-
I tried...
Code:Try myCmd.ExecuteNonQuery() Catch ex As Exception MessageBox.Show(ex.ToString) End Try
Leave a comment:
-
-
UPDATE query not working
I am trying to create an update query but it is failing to make any changes.
Below is the code I have...
Code:Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click Dim strSqlEditRecord As String Dim myCmd As OleDb.OleDbCommand myCmd = Nothing strSqlEditRecord = "UPDATE tblMain SET Per_Hour_Quota= '" & txtQuota.Text
-
-
If the framework is installed on the client, you can deploy the application on the client machine. This will install a local copy of the exe and will look for updates each time the app is started. Look for the 'Publish' under the 'Build' menu....Leave a comment:
-
Does it matter that I am using Access 2003 as the database?...Leave a comment:
-
vb.net SQL help needed
I am trying to run this query...
Code:strSql = "SELECT * FROM tblMain WHERE (((tblMain.Verifier_ID)='" & lstVerifier.SelectedItem & "') AND ((tblMain.Week_Ending_Date)='" & lstWeekEndingDate.SelectedItem & "'));"
-
query that returns values
I have a form that I have added a button to in the attempt to query my database. I am hoping to be able to generate a SQL statement based on 3 selections that the user makes. Once the SQL runs I need to return results to several txt boxes for possible edit by the user. Please advise if this code already exists or maybe point me in the right direction. Thanks a million!!! -
loading listbox with value
Ok....I need to know how to select a date in a listbox based on a returned value of the week ending date.
I will want this to occur in the load event of the form.
Code:Public Sub frmDataEntry_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load gMDB = New OleDb.OleDbConnection gMDB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Leave a comment:
No activity results to display
Show More
Leave a comment: