Click here to Skip to main content
15,847,748 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Shane James21-Jul-17 5:30
Shane James21-Jul-17 5:30 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Ralf Meier21-Jul-17 9:44
professionalRalf Meier21-Jul-17 9:44 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Shane James21-Jul-17 22:00
Shane James21-Jul-17 22:00 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Shane James21-Jul-17 22:02
Shane James21-Jul-17 22:02 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Ralf Meier22-Jul-17 11:25
professionalRalf Meier22-Jul-17 11:25 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Pawel Wzietek1-Aug-17 3:33
Pawel Wzietek1-Aug-17 3:33 
GeneralRe: Converting C# to VB.net but code gives null reference Pin
Eddy Vluggen3-Aug-17 1:06
professionalEddy Vluggen3-Aug-17 1:06 
QuestionAccess VBA - Return Object From Function Pin
Kevin Marois20-Jul-17 21:13
professionalKevin Marois20-Jul-17 21: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 21:37
mveRichard MacCutchan20-Jul-17 21:37 
GeneralRe: Access VBA - Return Object From Function Pin
Kevin Marois21-Jul-17 6:10
professionalKevin Marois21-Jul-17 6:10 
GeneralRe: Access VBA - Return Object From Function Pin
Richard MacCutchan21-Jul-17 7:11
mveRichard MacCutchan21-Jul-17 7:11 
GeneralRe: Access VBA - Return Object From Function Pin
Kevin Marois21-Jul-17 7:14
professionalKevin Marois21-Jul-17 7:14 
GeneralRe: Access VBA - Return Object From Function Pin
Richard MacCutchan21-Jul-17 7:34
mveRichard MacCutchan21-Jul-17 7:34 
GeneralRe: Access VBA - Return Object From Function Pin
Dave Kreskowiak21-Jul-17 8:02
mveDave Kreskowiak21-Jul-17 8:02 
GeneralRe: Access VBA - Return Object From Function Pin
Kevin Marois21-Jul-17 8:29
professionalKevin Marois21-Jul-17 8:29 
GeneralRe: Access VBA - Return Object From Function Pin
Dave Kreskowiak21-Jul-17 9:04
mveDave Kreskowiak21-Jul-17 9:04 
JokeRe: Access VBA - Return Object From Function Pin
Mycroft Holmes21-Jul-17 15:06
professionalMycroft Holmes21-Jul-17 15:06 
QuestionPrintQueue error Pin
Otekpo Emmanuel19-Jul-17 9:19
Otekpo Emmanuel19-Jul-17 9:19 
AnswerRe: PrintQueue error Pin
Richard Deeming19-Jul-17 10:06
mveRichard Deeming19-Jul-17 10:06 
GeneralRe: PrintQueue error Pin
Otekpo Emmanuel19-Jul-17 11:35
Otekpo Emmanuel19-Jul-17 11:35 
GeneralRe: PrintQueue error Pin
Richard Deeming19-Jul-17 12:14
mveRichard Deeming19-Jul-17 12:14 
QuestionStoring DICOM files into MSSQLSERVER database Pin
Member 1240668218-Jul-17 8:14
Member 1240668218-Jul-17 8:14 
AnswerRe: Storing DICOM files into MSSQLSERVER database Pin
Eddy Vluggen18-Jul-17 8:28
professionalEddy Vluggen18-Jul-17 8:28 
AnswerRe: Storing DICOM files into MSSQLSERVER database Pin
Dave Kreskowiak18-Jul-17 8:29
mveDave Kreskowiak18-Jul-17 8:29 
Questionvb.net 2010 error 'Microsoft.ACE.OLEDB.12.0' provider is not registered Pin
dcof14-Jul-17 6:38
dcof14-Jul-17 6: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.