Click here to Skip to main content
15,887,428 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
QuestionFile reference in Visual Basic Pin
Razanust3-Dec-11 5:56
Razanust3-Dec-11 5:56 
AnswerRe: File reference in Visual Basic Pin
Eddy Vluggen3-Dec-11 6:32
professionalEddy Vluggen3-Dec-11 6:32 
GeneralRe: File reference in Visual Basic Pin
Simon_Whale3-Dec-11 12:03
Simon_Whale3-Dec-11 12:03 
QuestionNew to Visual Basic Pin
PoddyCo1-Dec-11 2:49
PoddyCo1-Dec-11 2:49 
AnswerRe: New to Visual Basic Pin
Richard MacCutchan1-Dec-11 3:18
mveRichard MacCutchan1-Dec-11 3:18 
AnswerRe: New to Visual Basic Pin
DaveAuld1-Dec-11 5:27
professionalDaveAuld1-Dec-11 5:27 
AnswerRe: New to Visual Basic Pin
JR2121-Dec-11 19:34
JR2121-Dec-11 19:34 
AnswerRe: New to Visual Basic Pin
coded0071-Dec-11 19:58
professionalcoded0071-Dec-11 19:58 
AnswerThanks people Pin
PoddyCo2-Dec-11 5:55
PoddyCo2-Dec-11 5:55 
AnswerRe: New to Visual Basic Pin
elgaabeb9-Dec-11 4:03
elgaabeb9-Dec-11 4:03 
AnswerRe: New to Visual Basic Pin
daveh604517-Jan-12 23:35
daveh604517-Jan-12 23:35 
QuestionLoading a text document in vb.net Pin
waner michaud30-Nov-11 9:20
waner michaud30-Nov-11 9:20 
AnswerRe: Loading a text document in vb.net Pin
Richard MacCutchan30-Nov-11 11:52
mveRichard MacCutchan30-Nov-11 11:52 
AnswerRe: Loading a text document in vb.net Pin
ekolis30-Nov-11 14:04
ekolis30-Nov-11 14:04 
AnswerRe: Loading a text document in vb.net Pin
coded00730-Nov-11 23:58
professionalcoded00730-Nov-11 23:58 
AnswerRe: Loading a text document in vb.net Pin
Dave Kreskowiak1-Dec-11 4:06
mveDave Kreskowiak1-Dec-11 4:06 

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.