Hi all, I have already written a code to search for staff records from my staff database and it's working fine, but the problem is, if someone enters a wrong a wrong staff id or just any number or alphabets, it still displays the "Found Record" message, instead of "No Record Found". Please I need to write a check if a valid staff id is entered in the search textbox and if its invalid, "No Record Found" should be displayed. Here's my code below. Thanks for your help in advance [CODE]Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) …

Member Avatar
Member Avatar
+0 forum 26

can anybody help me.i got an error while searching a rec from table error @ 2nd line after connecting with access [code] Dim src As Integer src = Val(InputBox("enter rno:", "rno")) Data1.Recordset.FindFirst "rno=" & src [/code]

Member Avatar
Member Avatar
+0 forum 1

I am creating a shared database to record requests entered by a team of 30. I need to record the Order Number, Reviewer Name, Date, Action Type(Order Type), Client Name, and a comments box for each order entered. When creating forms, Currently Reviewer Name and Date are auto-input so the reviewer will not have to enter this information. Client Name, Action Type are drop down boxes and Order Number is manual input. All are required inputs excepting the comments field. Can 30 people add to one table all at the same time? Or is a more practical approach 30 tables …

Member Avatar
Member Avatar
+0 forum 3

can anyone please help me with my update statement, i am trying to update a row within a access 2007 database here is my code. [CODE] Dim con As New OleDb.OleDbConnection Dim cmd As New OleDb.OleDbCommand Try con.ConnectionString = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=" & Database & ";Persist Security Info=False" con.Open() cmd.Connection = con cmd.CommandText = "update tblUsers SET Password = @Password where ID= @ID" cmd.Parameters.AddWithValue("@Password", Me.txtpassword1.Text) cmd.Parameters.AddWithValue("@ID", _userid) cmd.ExecuteNonQuery() Catch ex As Exception MessageBox.Show("Error while inserting record on table..." & ex.Message, "Insert Records") Finally con.Close() End Try[/CODE] i receive the error Syntax Error on Update STATEMENT please can someone help this has …

Member Avatar
Member Avatar
+0 forum 5

Hello Folks, I am trying to create a Crystal report using data from two Access 2007 tables but it only displays the data from the first table only. when I do same with Access 2003, I am successful but it does not work in access 2007. Please help me to solve this problem. Thanks, Sammy

Member Avatar
Member Avatar
+0 forum 1

i am having issues with an update query. i normally use SQL 2005 but for this project i am using an access 2007 database please can anyone point me in the right direction, [CODE] Dim con As New OleDb.OleDbConnection Dim cmd As New OleDb.OleDbCommand Try con.ConnectionString = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=" & Database & ";Persist Security Info=False" con.Open() cmd.Connection = con cmd.CommandText = "update tblUsers " & vbCrLf & _ "SET Password = @Password" & vbCrLf & _ "where ID= @ID" cmd.Parameters.AddWithValue("@Password", Me.txtpassword1.Text) cmd.Parameters.AddWithValue("@ID", _userid) cmd.ExecuteNonQuery() Catch ex As Exception MessageBox.Show("Error while inserting record on table..." & ex.Message, "Insert Records") Finally con.Close() …

Member Avatar
Member Avatar
+0 forum 8

I was wondering if there is a code i could add to my applicatio that will delete a data entry from a database. I'm designing a voting application as my project and i want a situation where an access code is good for only one entry. i put my code for retrieving the code below. Is there anything that i can add to the code that will delete the entry that was used to login immediately after authentication? [CODE]Private Sub btnCodeEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCodeEnter.Click Dim connect As String Dim query As String Dim dbProvider …

Member Avatar
Member Avatar
+0 forum 10

Hey guys I'ld really appreciate if u can help me with this. I'm building an application that has an access database for storing codes for voters. my problem is that after i update my database with the usual vb codes, i'll have to exit the application before the datagrid view can read the update. please is there a way for me to see the changes i've made with the datagrid view without my exiting the application. I'm using vb 2010 express. thanks guys

Member Avatar
Member Avatar
+0 forum 5

Hi I have an application that has an Ms Access 2007 DataBase which runns great if access is installed. Is there any code that I can use in vb that I would be able to run access with out installing it. Tanks in advance

Member Avatar
Member Avatar
+0 forum 5

Hi guys! Any one have an idea of how to create a sub category in vb.net? well I'm thinking of building a sales and inventory system of computer parts and peripherals and here's the logic. I'll be assigning each of them category like for example: Componenets[INDENT]Peripherals[/INDENT][INDENT]Networking[/INDENT] - Processor[INDENT]- Chasis[/INDENT][INDENT] - Router[/INDENT] - Memory [INDENT]- keyboards[/INDENT][INDENT] - Bridge[/INDENT] - Storage[INDENT]- Speakers[/INDENT][INDENT] -Hub[/INDENT] - Optical Drive[INDENT]- Flash Drives[/INDENT][INDENT] - Switch[/INDENT] - Graphics Card There you go. and the main categories are: Componenets, Peripherals, Networking and the Subcategories are with the -(dash) on their names if you have an idea also on the …

Member Avatar
Member Avatar
+0 forum 2

I'm a newbie in vb. My first project is a grading system for a certain school. In my login form, there's a [B]Forgot Password button[/B]. In the Forgot Password form, the user is asked to answer a secret question that he filled up upon registration, and if the answer is correct it will lead him to a [B]Change Password form[/B]. My problem is, I don't know how to get then delete and then replace the password of a certain user. I attached some screen shots of my work. Please someone help me.. Thank you..

Member Avatar
Member Avatar
+0 forum 3

Hello everyone! I have a problem trying to get a user to be able to query the database with only the fields and specifics they want. Basically... User logs in, browses through record entries and then wants to see how many of the entries are under the age of 21 and instead of seeing every field in the database they just want to see the first name, last name, and of course the age. I was thinking of having a CommandButton that brings up a form with checkboxes (to select the fields) and text boxes(to input numbers or text) and …

Member Avatar
Member Avatar
+0 forum 4

Hello to everyone! I am an engineering student and we have this class wherein we use Microsoft Access. Our instructor gave as a hands on homework using the MS Access. As I do it at home and inputing numbers and etc all that I need to input, suddenly this [COLOR="Red"][B]ERROR[/B][/COLOR] pops out saying Error : (11) Division by zero. I hope you can help me because honestly I really do not have any idea about this error. Please.... Thanks!!!

Member Avatar
Member Avatar
+0 forum 2

I'm still new to Microsoft Access so I don't have a great understanding of its workings but have spent the past couple of months working on a project to manage the company's telphone bills. I'm essentially compiling the usage from every company phone each month into a final table by running the numbers through a sequence of queries set up by a senior staff member (I'm just a part time uni student). However, while adding in data from the month just past, I made an error somewhere along the line and its giving me the message "Data type mismatch in …

Member Avatar
Member Avatar
+0 forum 4

Hey every one i need some help please! I am trying to save a Database through c# but cant seem to crack it. I read a few threads but every one explains how to save an existing DB. In my program I am creating a new DB in c# then i want to save it. All the code works except the save. My program is totally useless without a save button. If someone can help please. Here's my code... using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial …

Member Avatar
Member Avatar
+0 forum 3

i`m working with access 2007, i have two tables SYS_USER, ACCOUNT TYPE. the first table contains (username, password, first name, last name). the second table is only one field (manager, admin, agent). there are two forms (administration, login), the administration form adds a new user, the login form makes user log in to the system. the code is working perfectly, but i`m just missing something, i need a code that checks if the user is admin, agent, or manager. then according to the selection a msgbox appears "hi admin", "hi manager", "hi agent". i attached the code, the login screen, …

Member Avatar
Member Avatar
+0 forum 1

HI everyone... i`m working on access 2007. i have two table called USER, and USER_PRIVILEGES i created a form with bound text boxes and bound check boxes. the text boxes are for the user information(first name, last name , ...etc) the bound check boxes are for (print report, delete, modify ,....etc) and a button save to add new user. the question is.. how can i give for every user certain privileges. example:- the admin can delete, modify, or insert new data. the regular agent can only view these data without modifying or deleting and can insert. so what should be …

Member Avatar
+0 forum 0

hi, im working on a small project on access 2007, i have a form that contains multiple textboxes ,and a save button. these textboxes are related to tables, so what i need is a code for that button to save the records in the textboxes in the tables and then show a msg box sayibg that the save processes is complete. .. thank you very much....

Member Avatar
Member Avatar
+1 forum 5

Hello, I need help saving data into an access 2007 database from a program created in vb 2008. I am making a basic "game" that allows you to move a "robot" up,down,left, right and will save the movements/positions into an access 2007 database. I already have the basic movement created with buttons that will change the robot location (the movements are done though a separate class). The main issue I have is creating the connection and saving the movements. the access database is located here, no password and I have already added it as a datasource in vb 2008: c:\hw3robot.accdb …

Member Avatar
Member Avatar
+0 forum 2

Hi all and thanks for reading this..... I have a question that I cannot seem to find an answer for, out there in the big ol ether they call the internet, it involves a three stage procedure on a button pressed within an Access form ... [B] stage 1 : [/B]click the button [B]stage 2 :[/B] check(as in tick or turn to a 1) TWO checkboxes in different table, then close it. [B]stage 3 :[/B] generate a random 9 digit passport number and birth certificate number and store them back in the form , in their respective fields on that …

Member Avatar
+0 forum 0

Hi, I am working on a project for work that requires the <%# Now() %> function output to be inserted into a text box field that passes it's value to an Access 2007 DB with the rest of the form data on submission. I am able to either make the textbox field display the Date/Time Stamp or for it to bind to the DB but can't do both. Any assistance would be appreciated. :-) I am using FormView in InsertItem mode.

Member Avatar
Member Avatar
+0 forum 1

Hi people, I have created a form that allows me to search customers from a datagrid table which holds the information from the customers table. I use a textbox to enter the phrase to search for and a search button. I can find the records within the datagrid table but it only selects them. I want the datagrid to only display the records found. How I achieve this ? [CODE]If RadioButtonName.Checked = True Then Me.CustomersTableAdapter.Fill(Me.NorthwindDataSetCustomers.Customers) For Each CurrentRow As DataGridViewRow In DataGridView1.Rows If CurrentRow.Cells(2).Value.ToString.Contains(TextBoxSearch.Text) Then CurrentRow.Selected = True End If Next End If[/CODE] The code above finds the customers name …

Member Avatar
Member Avatar
+0 forum 3

hi i have a question in getting values from two table i ave two tables Table1 and Table2. table 1 have data and table 2 may have the same data as table 1 and more. and also table 1 may have the same data and some which is not in table2 and vise versa. so what i want to do is to the the unique values in table1 and table2 and the intersecting values to a query. depending on the ID both the tables have the id andm title,email how can i do this i tried to do in join …

Member Avatar
Member Avatar
+0 forum 1

I have a small company Database that tracks our repair orders. I have a query that I would like to execute based on criteria that the user inputs. I am new to VBA so most of my code is based on google research. I took a technique of wrapping my criteria variables with get/set functions. Supposedly, according to this site: [URL="http://msdn.microsoft.com/en-us/library/dd671279(v=office.12).aspx"]http://msdn.microsoft.com/en-us/library/dd671279(v=office.12).aspx [/URL] it is possible to reference the functions "Get______()" through the query if I specify them as in the example on that site (by calling the function in the criteria field of the design mode view of the query). …

Member Avatar
Member Avatar
+0 forum 4

[B]SELECT staff.StaffNo, semester.SemesterID, teach.SubjectID, teach.Sub2, teach.Sub3, teach.Sub4, teach.Sub5, teach.Sub6, teach.TeachLoad, (IIf(IsNull( teach.SubjectID),0,1) + IIf(IsNull(teach.Sub2),0,1) + IIf(IsNull(teach.Sub3),0,1) + IIf(IsNull(teach.Sub4),0,1) + IIf(IsNull(teach.Sub5),0,1) + IIf(IsNull(teach.Sub6),0,1)) * 3 As teach.TeachLoad, FROM (subject INNER JOIN (staff INNER JOIN teach ON staff.StaffNo = teach.StaffNo) ON subject.SubjectID = teach.SubjectID) INNER JOIN semester ON staff.StaffNo = semester.Staff[/B] i try make query that will put the value of teach load automatically when i choose the subjects. let say i key in two subject, so the value of the teachload will be 6 (1 sub = 3 teachload) the problem is,i have error in my query. can u help me …

Member Avatar
Member Avatar
+0 forum 1

The End.