Click here to Skip to main content
15,910,661 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: View Network SQL Servers Pin
Yosh_7-Feb-10 1:42
professionalYosh_7-Feb-10 1:42 
GeneralRe: View Network SQL Servers Pin
DaveAuld7-Feb-10 2:02
professionalDaveAuld7-Feb-10 2:02 
GeneralRe: View Network SQL Servers Pin
Dave Kreskowiak7-Feb-10 8:37
mveDave Kreskowiak7-Feb-10 8:37 
GeneralRe: View Network SQL Servers Pin
William Winner8-Feb-10 10:27
William Winner8-Feb-10 10:27 
GeneralRe: View Network SQL Servers Pin
Dave Kreskowiak8-Feb-10 15:54
mveDave Kreskowiak8-Feb-10 15:54 
AnswerRe: View Network SQL Servers Pin
tosch7-Feb-10 20:44
tosch7-Feb-10 20:44 
GeneralRe: View Network SQL Servers Pin
Luc Pattyn8-Feb-10 10:44
sitebuilderLuc Pattyn8-Feb-10 10:44 
QuestionAssistance on Syntax with regards to Runtime Error-91 in VB 6.0 Pin
Ace Anthony C. Austria5-Feb-10 23:39
Ace Anthony C. Austria5-Feb-10 23:39 
I need help with a library computer system I'm creating. I am using ADODC to connect an MS Access database with my VB 6.0 project. As of now, I am working on a save function which saves records of reference materials on a particular table and, at the same time, saving a note on a separate audit trail table. The syntax for this code goes like:

'Note:
'AdoAudit is the ADODC that connects the audit trail table and the project
'AdoRec is the ADODC that connects the table of reference materials and the project

Private Sub cmdSave_Click()
tim = Now
AdoAudit.Recordset.AddNew
AdoAudit.Recordset.Fields("Operation") = "Added or Altered Reference Material"
AdoAudit.Recordset.Fields("DateDone") = Format(tim, "mm-dd-yyyy")
AdoAudit.Recordset.Fields("TimeDone") = Format(tim, "hh:mm:ss ampm")
AdoAudit.Recordset.Update

AdoRec.Recordset.Update

End Sub

The five lines with the AdoAudit are the codes I thought of for the audit trail table. It adds a new line in the said table and fills it with the operation done (in this case, saving a new reference material), the time it was done as well as the date before saving the said record.

However, whenever I run the program, it stops when I click cmdSave and Run-Time Error 91 "Object variable or With block variable not set". The highlighted syntax would be the five aforementioned lines involving AdoAudit. The save command for AdoRec, on the other hand, functions properly.

This is a major problem which prevents me from finishing the system. I have tried everything I know to fix this setback but, unfortunately, none of them fail to work. I am only a 2nd year IT student so I am not well versed on VB 6.0. Can anyone please help me with this problem using ADODC? Also, if possible, do you know what causes the stated error in VB 6.0 as well as means on how to remedy/avoid it?
AnswerRe: Assistance on Syntax with regards to Runtime Error-91 in VB 6.0 Pin
DaveAuld6-Feb-10 3:04
professionalDaveAuld6-Feb-10 3:04 
AnswerRe: Assistance on Syntax with regards to Runtime Error-91 in VB 6.0 Pin
Eddy Vluggen7-Feb-10 21:35
professionalEddy Vluggen7-Feb-10 21:35 
AnswerRe: Assistance on Syntax with regards to Runtime Error-91 in VB 6.0 Pin
BlackCatDeveloper11-Feb-10 12:43
BlackCatDeveloper11-Feb-10 12:43 
QuestionGet File Advanced Setting Pin
Padma N5-Feb-10 23:05
Padma N5-Feb-10 23:05 
AnswerRe: Get File Advanced Setting Pin
DaveAuld6-Feb-10 3:11
professionalDaveAuld6-Feb-10 3:11 
QuestionSomebody help me! Pin
chazy_chaz6405-Feb-10 22:26
chazy_chaz6405-Feb-10 22:26 
AnswerRe: Somebody help me! Pin
Johan Hakkesteegt5-Feb-10 22:48
Johan Hakkesteegt5-Feb-10 22:48 
AnswerRe: Somebody help me! Pin
Richard MacCutchan5-Feb-10 22:48
mveRichard MacCutchan5-Feb-10 22:48 
AnswerRe: Somebody help me! Pin
Dave Kreskowiak6-Feb-10 5:36
mveDave Kreskowiak6-Feb-10 5:36 
AnswerRe: Somebody help me! Pin
loyal ginger6-Feb-10 9:51
loyal ginger6-Feb-10 9:51 
QuestionMDI children w/progress bars not asynchronously updating Pin
Jim Dolson5-Feb-10 14:32
Jim Dolson5-Feb-10 14:32 
AnswerRe: MDI children w/progress bars not asynchronously updating Pin
Luc Pattyn5-Feb-10 15:00
sitebuilderLuc Pattyn5-Feb-10 15:00 
AnswerRe: MDI children w/progress bars not asynchronously updating Pin
Wayne Gaylard5-Feb-10 17:25
professionalWayne Gaylard5-Feb-10 17:25 
QuestionKeypress Event Double Firing Pin
eddieangel5-Feb-10 13:07
eddieangel5-Feb-10 13:07 
AnswerRe: Keypress Event Double Firing Pin
Luc Pattyn5-Feb-10 13:21
sitebuilderLuc Pattyn5-Feb-10 13:21 
Questiongood coding practices? Pin
kmas37525-Feb-10 8:26
kmas37525-Feb-10 8:26 
AnswerRe: good coding practices? [modified] Pin
Ray Cassick5-Feb-10 8:59
Ray Cassick5-Feb-10 8:59 

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.