Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Visual Basic





See Related Forum Messages: Follow the Links Below to View Complete Thread

Creating An Access 97 Database Through VB Code ?
Can anyone shed any light on how to create an Access 97 database, on the fly using VB code ??

Cheers

Creating Access Reports Via Code
Does anyone know of any tutorials on how to create access reports when you create an access database?

I'm using the Microsoft ActiveX Data objects 2.7 Library and the Microsoft ADO Ext. 2.7 for DDL and Security currently.

How would I create a report via code? please help!

Creating An Access Field With Code
Anyone know how I would start going about adding a field to an Access database using VB code? Is this possible?

Creating An Access .MDB File Through VB Code
Hi.

Is there a way to create an Access database (.MDB) file through code in VB6? For instance, I want to create an MDB file with the following data structure:

Field Type Length
Name String 20
Age Integer
BirthDate Date

Thanks for the info in advance!

Creating Access Table At Runtime In VB Through Code
Dear Sirs,

i Made a Application, While i wants to create a temporary table.then i will add records at runtime.at end i will drop table

How do I Anyone guide pls

Creating Linked-tables In Access By Code
I need to create a linked table from a table in SQL-server database.
I know it can be done by way of creating a DSN first and then linking using the code

tabledef1.name = "A"
tableDef1.Soucertablename="SQLA"
tabledef1.Connect="ODBC;Driver=SQL Server;......"

But I need to do all this DSN-less..Is it possible.

Please comment on this.I need this info urgent.
Thanks in advance

Anand Sagar
ba_sagar@yahoo.com

Creating An Access Database From Visual Basic Code
hi ,

can anyone help me in creating an access 200 database from the visual basic code.? i got some code from the net which creates database from the VB but when i use the code it is giving me error. iam posting the code in this thread. please go through and give me reply. this is part of my thesis work so please help me out.
thank you.

NOTE: i have visual basic 6.0 and access 2000 on my computer

code that creates database:

Option Explicit

Sub CreateAccessDatabase()
Dim CatDB As ADOX.Catalog
Set CatDB = New ADOX.Catalog
CatDB.Create "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=myMDB.mdb"
Set CatDB = Nothing
End Sub

Sub CreateTable()
Dim CatDB As ADOX.Catalog
Dim TabDB As ADOX.Table

Set CatDB = New ADOX.Catalog
Set TabDB = New ADOX.Table
'open the database
CatDB.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=myMDB.mdb"
'create new table object
With TabDB
.Name = "MyTable" 'set name
'add fields and specify datatype
.Columns.Append "First Name", adVarWChar
.Columns.Append "Last Name", adVarWChar
.Columns.Append "Age", adInteger
End With
'add the table to database
CatDB.Tables.Append TabDB
Set CatDB = Nothing
Set TabDB = Nothing
MsgBox "Database and Table created..."
End Sub

Private Sub cmdCreate_Click()
CreateAccessDatabase
CreateTable
End Sub

Compile time Error:

User defined type not defined
and the control goes to this line

Dim CatDB As ADOX.Catalog


Please give me reply on this

Creating Forms In Code VS. Creating At Design Time
Mostly. I have created forms and there controls at design time because it is much easer to move them around the form, and add code to each control or control array.

I am curtly working on a project that I would like to create the one form and all controls on the fly to create 5 different forms using code, But the process of defining each control and all of it attributes looks tedious.

Is there some way to design a form and all of it’s controls and then convert them to
the necessary code that can be pasted into the form definition?

Creating A DSN Through VB Code
How to create a DSN from VB Code?

i used the following functions. But i was not able to create the DSN.


ConfigDSn
CreateDataSource
ManageSQLDataSources
SQLDataSource

Everything ended with errors.
But nothing worked out. Can anyone give a sample for this?

Creating DSN Through Code
Well I think I am going to ask a very peculiar question the members of the elite forum. One of my students had asked me for help on this : Is there any way of creating a DSN through the VB code? Might be by using some kind of an API function.

If anyone have some idea, kindly let me know and oblige.

Creating An Avi Within Code
Hi all,
I want to create a still image movie with sound in avi format from within my application - are there any components out there that i could use to build this video, or any decent web sites showing how. Any links would be greatly appreciated.

thanx all.

Creating DSN In Code
I have to amend one of my projects so that it uses ADO instead of DAO. I need to connect via a DSN, but I want to create it in code. I usually do it with DBEngine.RegisterDatabase, but is there another way I can do it so that I do not have to add DAO references into my project?

Also how do I check if a DSN exists (apart from trying to connect to the DB and testing if it has suceeded)?

All help greatly appreciated!!

Creating DSN Through VB Code.
I am making a small find/replace applicatioin in visual basic 6.0. I want to accees different databases through this application for example
Ms Access 97 databases, Oracle databases, Ms SQL server databases. I want my application to create the DSN through VB code and the connection to above databases should be established using ODBC.
Kindly tell me how can i accomplish this.
Thank you all.
Ali Habib

Creating Forms W/Code
I'm creating a VB front end for a database application, and was wondering if anyone knew of a way to automatically create forms based on information in a text file, etc. Basically, I'd like to create an application that could read information from a text file, then create a VB form with controls based on data in the file. I could then add the form to another project. Any ideas?

Creating A Registration Code
I am not sure it's the right place for this, but here it goes..

I want to create a Registration Code for my application.
I have in mind creating a random number, have the user send it to me, massage that number a bit to create a code, and send it back for checking and authentification by my application, using obviously the same algorythm that I use to create the code.

Where can I find documents/methods/algorythms/etc. to do this kind of things? I suppose this has been done numerous times and that some people have created some clever algorythms...

Thanks for any lead on this.

Hervé Chain
Houston, TX

Creating A Picture By Code
Hi all,

i would like a picture box to be created by code, but i havent got a clue how to do it. Until now i have always had one in the background, which i bring forward and size and everything with code, but i would like to do it properly now. If anyone could give me some pointers. Either in VB5/6 or VB.NET/2003.

Cheers

Creating Control Through Code
I recently have come across a problem in VBA and I need to know how to create a control array. Anytime I run the program I get an error "Object variable or With block variable not set". I've tried this so far, still doesn't work.


Code:
Option Explicit

Dim com1(8) As ComboBox

Private Sub UserForm_Click()

End Sub

Private Sub UserForm_Initialize()
Dim n As Long
Set com1(0) = New Control

For n = 0 To 8
com1(0).Enabled = True
com1(0).CurX = n + n * n
Next
End Sub

Why wont that work?

Creating New Tabs Via Code
Hi everybody
Sorry i am not really sure how to use "indent" here so what i wrote may look weird for more reason then one
I am trying to create extra tabs for as many value as is entered in column A. Works fine. It crashes when I try to add more then 40 tabs, sometimes even when 20. I thought that it should be able to fit 100s of tabs
Any ideas on how to fix this ?


Sub Macro2()
DeleteExtra ' deletes extra tabs if any exists
DoEvents
Dim J As Integer 'number of records, maximum 186
Dim X As String ' value of successive cells
Dim Y As Integer 'number of sheets
Y = 2 ' 2 sheets by default



'
For J = 1 To 186
X = Worksheets("Main").Cells(J, 1).Value
If X = "" Then Exit Sub


Sheets("Q3_Q4_P&L").Select
Sheets("Q3_Q4_P&L").Copy After:=Sheets(Y)

ActiveSheet.Range("D5").Value = X
ActiveSheet.Name = X



Y = Y + 1 'next spreadsheet
Next





End Sub

Creating A Label With Code
Someone else asked about this a year or so ago but the answer given was sortof vague.

Link Here to His post

Flyguy had said to add a label with the Index property set to 0 and use a Load method to bring in new labels during runtime.

I have no idea what he is talking about? Any pointers would be very helpful.

Creating A Shape In Code
How would I make a rectangle in the code? At a specific time, I want the program to make a rectangle that was not previously there.

Is there any way to do this?

Thanks in advance.

Creating A Folder In Code
How can I create a folder when I create files such as database/text files?

Thanks!!

Creating CmdButtons Though Code.
Is it possible to create a control button though code? When you click a button, another button is created.

Creating An Object From Code
hello, i have a database which loads fields into variables. for each field, i would like to create a label with the contents of each field in its caption.

How do i go about creating a label (or any control object) from code, as opposed to creating it from the form?

Creating Object Using Code?
is this posibble? creating object using the code? example i would like to create command button using the code?

Creating Database Using Code ...
Hi

I am using the code which is in the FAQ by FlyGuy http://www.xtremevbtalk.com/show...threadid=20002

Rest is all okay.. but what i am unable to do is .. how would i create an AutoNumber field ? I am able to create text fields but not numeric fields and also not AutoNumber field. I want to create a AutoNumber field. How would i go for that ?

Numeric field is not important for now but AutoNumber field is very important. Please tell.

Thanks!

Creating New Form In Code
It's probably really simple, I just can't seem to find an example of this on google or here. Not sure exactly what to search for, and what I have searched for hasn't given me what I am looking for. So could someone please show me how to do this.

Creating A New Object Through Code
How do i create a new object, like a winsock, through code?
Instead of draging and dropping it from the objectbar?

Should'nt it be like:
dim var: var = new winsock
?

Creating Labels Using Code
is there a way to create labels w/ specific names, specific borderstyles and specific text? if anyone knows how to do it in vb 5 and vb net especially that would be great!

Creating Controls With Code
Hi!

I would like to create controls (textbox, labels etc.) with code. What I want to do is: Run a query on a server then have my program create controls for each record returned. Preferably with relevant labels as well.

Say for example, you run a search on the employees database with the employee number to retun that employee details(department, name, salary, job). Is it then posible to have results displyed in controls that are generated at Run time?

Your help would be appreciated.
Thatnx

Creating Textboxes Using Code?
is it possible to create textboxes to sow on a form using codes?;;
eg..prompt user to enter the number of rows of textboxes required and shown on the form?...ideally or theoratically infinite number?

Creating An Image Box In Code
How can I create a new image box using only code. And how can I add this new image box to an already existing array of image boxes?

Creating Forms From Code
hi
im trying to make a function a bit like a messagebox, and for that i want to be able to make a form or a box like a message box in the code, without it existing before...
is this possible???
tnx for any who helps
fasa

Creating Menus From Code
Hi,

This is almost like my previous thread... except I want to know how to create the menu under the title bar via code.

Do I have to use API calls ? or is there a much easier way ?

Regards

Vince

Creating An Mdb File With Code
how can we make an mdb file from vb with code, not with visual data manager, complete with the tables... please help me
thanks very mucn

Creating Forms With Code
Hi...I wanna know how to create a form with code and have some code under it's Resize event. I know how to create a form using code, but show me your way just in case mine doesn't work for what I want to do!

Creating An Object In Code
Hey,

I am trying to create either a listbox or a combobox in code that will popup on the screen with out it being physically put on the form. I am open to any help

B-29
B-29

VB Code For Creating Folders
I am looking for some VB code which will allow me to take user input and convert it into a folder name, and then create a folder with that name,like this:

Last 2 digits of the year: 99
Starting Folder Number: 0001
Ending Folder Number: 0050

I need to concatenate these items, plus a hyphen or underscore, so that the resulting string is 99-0001. I also need to use a FOR statement which will cycle through the entry range, so that the folders created are 99-0001 through 99-0050. Under each folder, there needs to be two (2) subfolders, each of which will have hardwired names.

The results that I seek would be similar to:

C:Folders
|_ 00-0001
| |_ Name1
| |_ Name2
|
|_ 00-0002
| |_ Name1
| |_ Name2
|

If anyone can either point me to a block of existing code (surely I can't be the first to want to do this!! ), or give me generic block, I would be very grateful. I have not programmed in VB in over 5 years, so my skills are RUSTY, and I don't have the time to re-learn them ... just now!

Creating An Executable Thru Code
Is it possible to write a program which in itself will create an executable, Is there a compile api call.


I want to write a questionaire program where the questions and multi-choice answers are entered into text boxes and option buttons then have my program create a distributable executable program that can be run by others with questions and possible answers. The questions are answered and at the end creates a text file which will be read by another program. I am OK about the text file part of the project.

Creating Objects (in Code)
I hope someone can help me with this one.

I have 1 project "A" that creates an object (of another project "B"). I want to be able to run project "B" in code, so I added it to the Project "A" group and then added a reference from project "A" to project "B".

When I'm running code on project "A" and getting to a line where the object (project "B") function is called, I can't see the code for it. I get the result right away instead of stepping in the code.

I tried to remove and add the reference, to reload the projects, restart the computer....

Any ideas?

Creating A Mysql DSN In Code
Hi can anyone tell me how to create an ODBC DSN to a mysql database through VB. I also need to be able to specify the port number of the server machine.

Thanks
John B

Creating Objects Using Code
Hi. I have a school project which is to create a game, and I decided on Monopoly. Can someone please tell me how to make a new object usign code? I mean, I'll be using picture boxes to create a house or hotel in the game, so instead of having over 200 picture boxes in a control array, It would be better to simply put code that would create one when needed. and if anyone has some good ideas, can you please give me suggestions on creating an AI for a game like this?

Creating Controls Using Code
Hi. I am working on a program that makes short spelling tests for language students. You can create tests and run them in the program. There is a setting which lets you decide how many spellings there are in the test. What I wanted to do was use a bit of code like this:
(Length is defined in the projects module)
Code:
Dim i As Integer
For i=1 to Length
  Dim txttop As Integer
  Dim txtl As TextBox
  txtl.Height=
  txtl.Width=
  txtl.Name=


I realise that this can't be done, however. Is there a way to create controls on the form during runtime?

Thankyou for any help I may recieve!

Creating A Table In Code...
Good Morning,

I am attempting to create an access table from VB. All the end user should do is name the table. I know there are ways to enter fields and obviously modify records, but is it possible to create a table in code. TIA. Also, I am trying to link a progress bar control to data going into a database from a text file, possibly I need to relate the number ofl ines in the text file to the incrementof the progress bar.

Any help on these would be much appreciated,

Stu H.

Creating Oracle Dsn From Code
i need to create a dsn from code...all the code i got was for sql server or access database...please help me out with this

Creating Image Thru Code
hai,
     how i could create an image file through code?i displayed a image containing the discontinued polygon and i fould the coordinates of the completed figure theu code.
     how could i create new image file(containg the completed figure) thru code.coudl u help mew out plz?
  
 

Creating A Dll In Vb For Code Reuse
Hi,
I have some code written in VB.
its a simple code which takes a string as an argument ,processes it and then returns a string.The processing is complex.
I would like to make this code available in other languages like vc++ and vj++.
How do i create a dll in vb so that i can use it in vj++ or Vc++ using a DLL Import statement.


Can someone tell me if this can be done ?
Thanks/Regards
Sanket Gupta

Creating A Mdb File Through The Vb Code
I have to create an application in which the database have to be created by the application itself.

Is it possible to create a mdb file (MS Access 97) throught the vb code?

After creating the mdb file how can a table be created through the code?

Please Review Code To Send Appointment From Access Code
This code is intended to send an appointment. When I double click my command button,in Access 97, nothing happens, and the appointment that I am send to myself does not appear. Any ideas, here is the code:

Private Sub Command94_Click()
Dim objOutlook As New Outlook.Application
Dim objAppoint As Outlook.AppointmentItem


Set objAppoint = objOutlook.Session.GetDefaultFolder(olFolderCalendar).Items.Add
objAppoint.Recipients.Add "burgesse"
objAppoint.Subject = "Subject-test appointment"
objAppoint.Body = "test appointment body"
objAppoint.Location = "Test Location"
objAppoint.Start = "6/6/02 2:00 pm"
objAppoint.End = "6/6/02 3:00 pm"
objAppoint.Send

End Sub


Thanks

Please Review Code To Send Appointment From Access Code
This code is intended to send an appointment. When I double click my command button,in Access 97, nothing happens, and the appointment that I am send to myself does not appear. Any ideas, here is the code:

Private Sub Command94_Click()
Dim objOutlook As New Outlook.Application
Dim objAppoint As Outlook.AppointmentItem


Set objAppoint = objOutlook.Session.GetDefaultFolder(olFolderCalendar).Items.Add
objAppoint.Recipients.Add "burgesse"
objAppoint.Subject = "Subject-test appointment"
objAppoint.Body = "test appointment body"
objAppoint.Location = "Test Location"
objAppoint.Start = "6/6/02 2:00 pm"
objAppoint.End = "6/6/02 3:00 pm"
objAppoint.Send

End Sub


Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved