Click here to Skip to main content
15,905,683 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Application Deployment Pin
Dave Kreskowiak12-Dec-11 8:34
mveDave Kreskowiak12-Dec-11 8:34 
AnswerRe: Application Deployment Pin
dr.kitanjal15-Dec-11 1:57
dr.kitanjal15-Dec-11 1:57 
QuestionArray not calculating correctly Pin
Member 847941811-Dec-11 11:25
Member 847941811-Dec-11 11:25 
AnswerRe: Array not calculating correctly Pin
Andy_L_J12-Dec-11 0:24
Andy_L_J12-Dec-11 0:24 
GeneralRe: Array not calculating correctly Pin
Member 847941812-Dec-11 8:39
Member 847941812-Dec-11 8:39 
AnswerRe: Array not calculating correctly Pin
Andy_L_J12-Dec-11 11:58
Andy_L_J12-Dec-11 11:58 
Questionsql query for filtering Access database by date Pin
Amanjot10-Dec-11 16:34
Amanjot10-Dec-11 16:34 
AnswerRe: sql query for filtering Access database by date Pin
JR21210-Dec-11 19:56
JR21210-Dec-11 19:56 
AnswerRe: sql query for filtering Access database by date Pin
Dave Kreskowiak11-Dec-11 3:27
mveDave Kreskowiak11-Dec-11 3:27 
AnswerRe: sql query for filtering Access database by date Pin
coded00711-Dec-11 21:35
professionalcoded00711-Dec-11 21:35 
QuestionVB.NET 2010, Form Close Question Pin
Framework .l.9-Dec-11 15:19
Framework .l.9-Dec-11 15:19 
AnswerRe: VB.NET 2010, Form Close Question Pin
Luc Pattyn9-Dec-11 15:34
sitebuilderLuc Pattyn9-Dec-11 15:34 
AnswerRe: VB.NET 2010, Form Close Question Pin
daveh604517-Jan-12 23:28
daveh604517-Jan-12 23:28 
QuestionConection lines without crossing other lines Pin
JR2128-Dec-11 2:20
JR2128-Dec-11 2:20 
AnswerRe: Conection lines without crossing other lines Pin
Luc Pattyn8-Dec-11 2:43
sitebuilderLuc Pattyn8-Dec-11 2:43 
QuestionTree view Pin
Member 84675328-Dec-11 0:46
Member 84675328-Dec-11 0:46 
AnswerRe: Tree view Pin
Simon_Whale8-Dec-11 0:56
Simon_Whale8-Dec-11 0:56 
QuestionConnection String for remote access database Pin
Vikash Yadav6-Dec-11 19:53
Vikash Yadav6-Dec-11 19:53 
AnswerRe: Connection String for remote access database Pin
DaveAuld6-Dec-11 20:13
professionalDaveAuld6-Dec-11 20:13 
GeneralRe: Connection String for remote access database Pin
Vikash Yadav6-Dec-11 20:39
Vikash Yadav6-Dec-11 20:39 
GeneralRe: Connection String for remote access database Pin
DaveAuld6-Dec-11 20:57
professionalDaveAuld6-Dec-11 20:57 
QuestionHow to copy a root directory (copy a flash drive) and paste it somewhere else? Pin
Brandon-X120006-Dec-11 15:33
Brandon-X120006-Dec-11 15:33 
AnswerRe: How to copy a root directory (copy a flash drive) and paste it somewhere else? Pin
Skynet_Code6-Dec-11 22:18
Skynet_Code6-Dec-11 22:18 
QuestionCode crashing on FindFirst Pin
Cynthia Quiroz4-Dec-11 13:15
Cynthia Quiroz4-Dec-11 13:15 
Hello everyone -- Need some help. I am setting up an Access Database with employee information, here's the problem...I need to search for an EmployeeID and if it does not exist I need to add it, if it does exist I need certain fields on the form to autofill. It keeps crashing on the FindFirst statement...Here is my code


Private Sub ID_AfterUpdate()

Dim strAdd As String
Dim db As DAO.Database
Dim rst As DAO.Recordset


Set db = CurrentDb
Set rst = db.OpenRecordset("Employee Table";)

rst.FindFirst "[ID] = " & Me.ID.Value

If rst.NoMatch Then

'Add new employee information to database

rst.AddNew
rst![ID] = Me.ID.Value
rst![SocSecNo] = Me.txtSocSecNo.Value
rst![Craft] = Me.txtCraft.Value
rst![JobNo] = Me.txtJobNo.Value
rst![LastName] = Me.txtLastName.Value
rst![Suffix] = Me.txtSuffix.Value
rst![FirstName] = Me.txtFirstName.Value
rst![MiddleInitial] = Me.txtMiddleInitial.Value
rst![TWICCardNo] = Me.txtTWICCardNo.Value
rst![TWICCardExp] = Me.dteTWICCardExp.Value
rst![HireDate] = Me.HireDate.Value
rst![TermDate] = Me.TermDate.Value
rst.Update
Else

'Autofill form based on ID number entered

Me.txtSocSecNo.Value = rst![SocSecNo]
Me.txtCraft.Value = rst![Craft]
Me.txtJobNo.Value = rst![JobNo]
Me.txtLastName.Value = rst![LastName]
Me.txtSuffix.Value = rst![Suffix]
Me.txtFirstName.Value = rst![FirstName]
Me.txtMiddleInitial.Value = rst![MiddleInitial]
Me.txtTWICCardNo.Value = rst![TWICCardNo]
Me.dteTWICCardExp.Value = rst![TWICCardExp]
End If


End Sub

Any help I can get will be very much appreciated...Thanks!

Cynthia Quiroz
AnswerRe: Code crashing on FindFirst Pin
Eddy Vluggen5-Dec-11 8:50
professionalEddy Vluggen5-Dec-11 8:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.