Click here to Skip to main content
15,898,035 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionClear DataGrid sorting Pin
Mohammad Al Hoss18-Jun-08 4:47
Mohammad Al Hoss18-Jun-08 4:47 
AnswerRe: Clear DataGrid sorting Pin
Ashfield18-Jun-08 9:05
Ashfield18-Jun-08 9:05 
GeneralRe: Clear DataGrid sorting Pin
Mohammad Al Hoss18-Jun-08 21:49
Mohammad Al Hoss18-Jun-08 21:49 
GeneralRe: Clear DataGrid sorting Pin
Ashfield18-Jun-08 22:19
Ashfield18-Jun-08 22:19 
GeneralRe: Clear DataGrid sorting Pin
Mohammad Al Hoss18-Jun-08 22:22
Mohammad Al Hoss18-Jun-08 22:22 
GeneralRe: Clear DataGrid sorting Pin
Ashfield18-Jun-08 22:49
Ashfield18-Jun-08 22:49 
QuestionCount records using a wildcard... Pin
CCG318-Jun-08 4:07
CCG318-Jun-08 4:07 
AnswerRe: Count records using a wildcard... Pin
Noctris18-Jun-08 5:53
Noctris18-Jun-08 5:53 
For as far as I can see.. you are requesting a fieldname in your table with a parameter :

"...where (@CurrDepart)=?"...

Which is something you can't do in access... you must use an actual string in the Sql command..

Looking at your code.. i'm gessing you made a mistake cause you don't do any check on the me.txtCurGL.text.tostring string and even add a % ( which is not valid for a column name

so...

with cmd
.connection = connection
.commandtext = "select count(ActAcct) as existingRecords from [SHACT] where yourtablenamehere = @CurrDepart"
.parameters.addwithvalue("@CurrDepart",me.txtCurGL.text.Tostring & "%")
end with
connection.open()


Should work a bit better
GeneralRe: Count records using a wildcard... Pin
CCG318-Jun-08 6:15
CCG318-Jun-08 6:15 
GeneralRe: Count records using a wildcard... Pin
Ashfield18-Jun-08 9:14
Ashfield18-Jun-08 9:14 
GeneralRe: Count records using a wildcard... Pin
CCG318-Jun-08 9:24
CCG318-Jun-08 9:24 
GeneralRe: Count records using a wildcard... Pin
Noctris18-Jun-08 22:33
Noctris18-Jun-08 22:33 
GeneralRe: Count records using a wildcard... Pin
CCG319-Jun-08 2:09
CCG319-Jun-08 2:09 
QuestionXML help please - never worked with this structure before Pin
penguin500018-Jun-08 3:50
penguin500018-Jun-08 3:50 
AnswerRe: XML help please - never worked with this structure before Pin
Johan Hakkesteegt19-Jun-08 0:07
Johan Hakkesteegt19-Jun-08 0:07 
QuestionData Access Layer Pin
Fahim A18-Jun-08 3:32
Fahim A18-Jun-08 3:32 
AnswerRe: Data Access Layer Pin
Mohammad Al Hoss18-Jun-08 4:53
Mohammad Al Hoss18-Jun-08 4:53 
AnswerRe: Data Access Layer Pin
Fahim A19-Jun-08 12:58
Fahim A19-Jun-08 12:58 
QuestionDatagridview columns Pin
Jay Royall18-Jun-08 2:26
Jay Royall18-Jun-08 2:26 
AnswerRe: Datagridview columns Pin
Johan Hakkesteegt18-Jun-08 23:55
Johan Hakkesteegt18-Jun-08 23:55 
GeneralRe: Datagridview columns Pin
Jay Royall19-Jun-08 1:32
Jay Royall19-Jun-08 1:32 
Questionhow to read file Pin
Ebube18-Jun-08 2:21
Ebube18-Jun-08 2:21 
AnswerRe: how to read file Pin
Noctris18-Jun-08 3:11
Noctris18-Jun-08 3:11 
AnswerRe: how to read file Pin
Ashfield18-Jun-08 3:39
Ashfield18-Jun-08 3:39 
GeneralRe: how to read file Pin
Ebube18-Jun-08 4:57
Ebube18-Jun-08 4:57 

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.