|
What is this?
tblName = (cmbInsertData.Text)
setTableName(tblName)
I do not see a declaration of the Variable tblName ( Dim tblName as String ). I believe VB will create this as an Object type without the Dim statment, and then you are trying to us it as a string?
what is setTableName? are you expecting the variable tblName to change when it comes out of setTableName?
Step thru the code line for line in debug and you can see exactly what all your variables are and what might be missing.
Joe
-- modified at 0:37 Sunday 6th August, 2006
|
|
|
|
|
Hi Joe, I have declared tblName as a String at the top of the form as it is used a few times throughout the form. setTableName(tblName) is a method within a Module I created to store the name of the table in the database I am using so that I can use it in another form with the method getTableName.
I've looked through and can't find any errors, like I said before it works fine at University. I emailed someone my project from another forum and they said it worked fine on their pc also so were unsure as the problem, theyve uploaded it to the forum if anyone wants to download it and look at the code first hand they can.
It is message 12 by user "doWhileSomething" and the program is in the link Program, the forum is at :-
http://www.vbcity.com/forums/topic.asp?tid=131204&page=2RID424741
|
|
|
|
|
Hi, I have now fixed this problem, my MDACs were not up to date, so once I updated these everything worked fine.
Thanks again.
John.
|
|
|
|
|
Hello, This is partly an MS-Word question but I am using VB subroutines which is where my problem arises.
I have created a find and replace script that uses wildcards to find a pattern throughout a Microsoft Word 2003 document and replace the pattern with itself but with a different font color. The find and replace portions both work great as I am recording the macro (finding all instances of the pattern and changing the color). However, when I go back and run the macro to test it, it only finds the first instance of my pattern. Word apparently does not have the ability to record finds for all instances of a pattern in one pass.
I tried putting a EOF or LOF function to force the macro to run until the end of file is reached but I get caught in an endless loop and I have to shut down the application all together. Does anyone know of a way of performing this action. Below is my code without a loop where only the first instance of the pattern is found.
Thanks
Sub test()
'
' test Macro
' Macro recorded 8/5/2006 by Harold Woodall
'
Selection.Find.ClearFormatting
For Counter = 1 To 500
With Selection.Find
.Text = "(\>[A-Z,a-z]{1,250}\<)"
.Replacement.Text = "\1"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = True
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorBlue
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
Next
End Sub
|
|
|
|
|
That is,a windows form consist of 3 textboxes say name,age,address.One can enter values in these textboxes a it is added into a datagrid placed below.
What i want to know is in this grid a row is selected ,if the focus is now on the datagrid & if i am pressing enter key means i want tht values to be set in the corresponding textboxes.What i want to know is how can we work key-press events within the datagrid
with regards
rahul
let the noble thought come from every side:Rig Veda
|
|
|
|
|
you could use a really dirty trick.
Create a button and set it as the default button of the form, so that it will fire a Button.Click Event as you press the enter key. in the method handling that event, put the code that writes the values selected in the textboxes. then hide the button.
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
Hi,
This is more of a general question with VB.NET than asking for code. If you're making a TCP/IP server that you expect to get many connections (30 and up) do you create a new thread per tcpClient or Socket or one thread for X amount of connections... or something different? And would your answer be different if the number of connections were 2,000 and above?
|
|
|
|
|
Hi All,
I want to save time from excel file to access database.
excelsheet contain value 3.5 as time,this value I want to store into database datetime field as time.
I don't know it is possible or not.
If anyone know something please share with me.
Thanks,
Nagraj
|
|
|
|
|
if you know what does 3.5 means as a date you may do some calculations to convert it as a long number like 12032009
then manipulate with this number as a string.
make like 12-03-2009
then convert it to date (use Cdate or Ctype)
then save it to the database
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
The Date time Field is going to store the date such as 3/3/2006 along with the time 12:00 AM. If I read this correctly 3.5 represents a measurment of time, 3 and a half hours, and not an actual Time of day. You should look at decimal data type or even a string.
|
|
|
|
|
hi
i have a data set filled with a datatable, can i add another data table to the same data set without affecting the data of first datatable.
what if i have many tables to fill a dataset,these table may or may not depend on each other also how can i remove a datatable from a dataset
thanks & regards
DEV
|
|
|
|
|
A DataSet is like an 'in memory' copy of your database.
It can contain as many tables as you require and you can set relationships/constraints just like you can in your database.
To add a table to your dataset:
myDataTable = New DataTable("myDataTable")
myDataSet.Tables.Add(myDataTable)
To remove a table from your dataset:
myDataSet.Tables.Remove(myDataTable)
You should check your relationships and constraints before removing a table from your dataset since you may affect the referential integrity that you have set up.
Steve
|
|
|
|
|
I am new to VB.net, is it possible to delete a session cookie from browser (IE) without closing the browser at client side? Thanks.
Frank
Frank
|
|
|
|
|
Perhaps that can be done using Javascript.
---
b { font-weight: normal; }
|
|
|
|
|
Good Morning Everyone,
I have a problem, i've spend too much time trying to figure out how can i get the "click event" from a ImageButton inside a GridView. I have a dynamic generated GridView, after i create the columns and all, i have to create an ImageButton for each one of the elements on the GridView, i'm trying to make something like a dinamic two dimensional array for the asp page.
The problem is, i could create all the columns and buttons with the commandName and everything else for each one, i thought the GridView_RowCommand could catch the event from the Button, but it doesn't so i don´t know where can i catch it ?
I've tried to make the columns of type TemplateField, but when i try to Add the ImageButton, i can't because of the components type's.
I'm out of ideas, if someone had the same problem and knows how to solve it, please tell me
J
|
|
|
|
|
Hi
On Windows XP, to manually give a user permission to "Access this computer from the network", you do the following:
Start \ Settings \ Control Panel \ Administrative Tools \ Local Security Policy \ Local Policies \ User Rights Assignment \ Access this computer from the network \ Add User or Group
Does anyone know how to automate this process? I want one user to be given this permission automatically when my product is installed (installshield)
Is it possible to write a script to do this?
Thanks
Kevin
KevinSheedy
|
|
|
|
|
I know that this might be a bit to much to ask. but can some one provide me with a simple example where Ajax is been used (both client and server side scripting)?
|
|
|
|
|
|
How do i drag and drop images and at the same time see a thumbnail size image been draged accross with the mouse arrow?
|
|
|
|
|
I have found that I can run a query using Access query builder works fine but the same query does not work in the "TableAdapter Query Configuration Wizard". Why is this? How can I get this to work?
Example:
SELECT * from Rental_Agreement
WHERE DateSerial(year(end_date), month(end_date) , day(end_date) - 5) = Date()
This works in Acess 2003 but not in the "TableAdapter Query Configuration Wizard".
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
The difference is that in your Access query, you're using VBA functions to supply certain items (like Date() and DateSerial()). Since these functions don't exist in SQL, you can't use them in the TableAdapter Query Wizard.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
pls... help me in this program i am new in this programming language.....
asa
|
|
|
|
|
Can you explain in a bit more detail?
Give an example of what you are trying to do...
Steve
|
|
|
|
|
for example you input 35 the it will convert that to word thirty five, 1,000,000 one million, 355,000 three hundred fifty five thousand.... can you help me???
asa
|
|
|
|
|