Click here to Skip to main content
15,896,201 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Shane James21-Jul-17 4:30
Shane James21-Jul-17 4:30 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Ralf Meier21-Jul-17 8:44
mveRalf Meier21-Jul-17 8:44 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Shane James21-Jul-17 21:00
Shane James21-Jul-17 21:00 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Shane James21-Jul-17 21:02
Shane James21-Jul-17 21:02 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Ralf Meier22-Jul-17 10:25
mveRalf Meier22-Jul-17 10:25 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Pawel Wzietek1-Aug-17 2:33
Pawel Wzietek1-Aug-17 2:33 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Eddy Vluggen3-Aug-17 0:06
professionalEddy Vluggen3-Aug-17 0:06 
QuestionAccess VBA - Return Object From Function Pin
Kevin Marois20-Jul-17 20:13
professionalKevin Marois20-Jul-17 20:13 
I've got this code that queries a table and returns a model:

Public Function GetRightCategory(Id As Integer) As RightCategoryModel
Dim result As New RightCategoryModel

Dim queryCmd As String
queryCmd = "SELECT RightCategoryId, Category, Description, IsDeleted FROM tblRightCategories WHERE RightCategoryId = " + CStr(Id)

Dim Db As Database
Dim rs As Recordset
Set Db = DBEngine(0)(0)
Set rs = Db.OpenRecordset(queryCmd)

If rs.RecordCount > 0 Then

    With result
        .Id = rs.Fields("RightCategoryId")
        .Category = rs.Fields("Category")
        .Description = rs.Fields("Description")
        .IsDeleted = rs.Fields("IsDeleted")
    End With

End If

set GetRightCategory = result

Everything works great until I get past the last line. Then I get "Object doesn't supprot this property or method"

What's wrong here?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

SuggestionRe: Access VBA - Return Object From Function Pin
Richard MacCutchan20-Jul-17 20:37
mveRichard MacCutchan20-Jul-17 20:37 
GeneralRe: Access VBA - Return Object From Function Pin
Kevin Marois21-Jul-17 5:10
professionalKevin Marois21-Jul-17 5:10 
GeneralRe: Access VBA - Return Object From Function Pin
Richard MacCutchan21-Jul-17 6:11
mveRichard MacCutchan21-Jul-17 6:11 
GeneralRe: Access VBA - Return Object From Function Pin
Kevin Marois21-Jul-17 6:14
professionalKevin Marois21-Jul-17 6:14 
GeneralRe: Access VBA - Return Object From Function Pin
Richard MacCutchan21-Jul-17 6:34
mveRichard MacCutchan21-Jul-17 6:34 
GeneralRe: Access VBA - Return Object From Function Pin
Dave Kreskowiak21-Jul-17 7:02
mveDave Kreskowiak21-Jul-17 7:02 
GeneralRe: Access VBA - Return Object From Function Pin
Kevin Marois21-Jul-17 7:29
professionalKevin Marois21-Jul-17 7:29 
GeneralRe: Access VBA - Return Object From Function Pin
Dave Kreskowiak21-Jul-17 8:04
mveDave Kreskowiak21-Jul-17 8:04 
JokeRe: Access VBA - Return Object From Function Pin
Mycroft Holmes21-Jul-17 14:06
professionalMycroft Holmes21-Jul-17 14:06 
QuestionPrintQueue error Pin
Otekpo Emmanuel19-Jul-17 8:19
Otekpo Emmanuel19-Jul-17 8:19 
AnswerRe: PrintQueue error Pin
Richard Deeming19-Jul-17 9:06
mveRichard Deeming19-Jul-17 9:06 
GeneralRe: PrintQueue error Pin
Otekpo Emmanuel19-Jul-17 10:35
Otekpo Emmanuel19-Jul-17 10:35 
GeneralRe: PrintQueue error Pin
Richard Deeming19-Jul-17 11:14
mveRichard Deeming19-Jul-17 11:14 
QuestionStoring DICOM files into MSSQLSERVER database Pin
Member 1240668218-Jul-17 7:14
Member 1240668218-Jul-17 7:14 
AnswerRe: Storing DICOM files into MSSQLSERVER database Pin
Eddy Vluggen18-Jul-17 7:28
professionalEddy Vluggen18-Jul-17 7:28 
AnswerRe: Storing DICOM files into MSSQLSERVER database Pin
Dave Kreskowiak18-Jul-17 7:29
mveDave Kreskowiak18-Jul-17 7:29 
Questionvb.net 2010 error 'Microsoft.ACE.OLEDB.12.0' provider is not registered Pin
dcof14-Jul-17 5:38
dcof14-Jul-17 5:38 

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.