Click here to Skip to main content
16,007,163 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalhelp with downloading from a login/pass web using php (repost) Pin
17-Mar-02 6:45
suss17-Mar-02 6:45 
GeneralPlease help me ! answer something! Pin
31-Mar-02 11:19
suss31-Mar-02 11:19 
Generalconerting path Pin
mohith17-Mar-02 2:57
mohith17-Mar-02 2:57 
GeneralRe: conerting path Pin
Jeremy Falcon18-Mar-02 3:22
professionalJeremy Falcon18-Mar-02 3:22 
QuestionHow can I pass animation from Flash5 to VB6 ?? Pin
Ahuva14-Mar-02 2:31
Ahuva14-Mar-02 2:31 
GeneralVBS & Excel Files Pin
king_ging13-Mar-02 23:18
king_ging13-Mar-02 23:18 
Questionhow to create a reusable control program for web database. Pin
11-Mar-02 1:42
suss11-Mar-02 1:42 
GeneralVB6, Databases, and DataGrids! Pin
Matt-T10-Mar-02 1:26
Matt-T10-Mar-02 1:26 
Hi,

I have connected a database to a DataGrid in VB6, but I need to do 2 things with it.

1, I want to sort the database alphabetically by a certain field, before it is displayed in the DataGrid.
I have tried using some SQL but it doesnt like it. Does anyone know how to do this, or if there is a specific 'Reference' or 'Component' which needs adding?

I can add, amend and delete records from the database, I just cant sort it!
Here is code I am using to connect to the database and table:

Dim strQ As String
strQ = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & App.Path & "\lottery.mdb"
cnControls.Open strQ
rsControls.Open "syndicate1", cnControls, adOpenKeyset, adLockOptimistic
Set grdControls.DataSource = rsControls

2, The second problem I have, is with the display of the DataGrid in VB. The database table is automatically read into the DataGrid, and I want to customize the width of the 'fields' of the DataGrid.
Does anyone know how to do this?

At present, some columns are too narrow or wide for the data being displayed. Because of this, some field names arent fully visible.

Any help will be greatly appreciated,
Many Thanks, Matt
GeneralRe: VB6, Databases, and DataGrids! Pin
12-Mar-02 5:09
suss12-Mar-02 5:09 
GeneralNeed some information about VBA,Thank you! Pin
big20029-Mar-02 21:22
big20029-Mar-02 21:22 
GeneralNeed some information about VBA,Thank you! Pin
9-Mar-02 20:56
suss9-Mar-02 20:56 
GeneralCreation of Excel files Pin
Sudhakar8-Mar-02 19:42
Sudhakar8-Mar-02 19:42 
GeneralRe: Creation of Excel files Pin
David Wengier9-Mar-02 1:41
David Wengier9-Mar-02 1:41 
GeneralWSH, SendKeys, and AppActivate - URGENT RESPONSE NEEDED Pin
8-Mar-02 11:08
suss8-Mar-02 11:08 
GeneralVBScript Type Mismatch Pin
8-Mar-02 8:09
suss8-Mar-02 8:09 
GeneralImage in Menu and Buttonmenu Pin
7-Mar-02 23:46
suss7-Mar-02 23:46 
GeneralControlling the Printer Pin
budgie7-Mar-02 23:46
budgie7-Mar-02 23:46 
GeneralRe: Controlling the Printer Pin
Paul M Watt21-Apr-02 13:37
mentorPaul M Watt21-Apr-02 13:37 
GeneralPrinting my VB project Pin
7-Mar-02 23:35
suss7-Mar-02 23:35 
GeneralRe: Printing my VB project Pin
David Wengier7-Mar-02 23:33
David Wengier7-Mar-02 23:33 
QuestionHow to deal with a Word document? Pin
big20027-Mar-02 3:05
big20027-Mar-02 3:05 
GeneralRe: I am a chinese boy,give me a hand,thank you! Pin
Zell6-Mar-02 23:03
Zell6-Mar-02 23:03 
GeneralUnix "Who" equival in VB Pin
AG5-Mar-02 17:11
AG5-Mar-02 17:11 
GeneralRe: Unix "Who" equival in VB Pin
David Wengier5-Mar-02 18:31
David Wengier5-Mar-02 18:31 
GeneralRe: Unix "Who" equival in VB Pin
AG5-Mar-02 23:41
AG5-Mar-02 23:41 

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.