|
-
May 16th, 2007, 11:48 AM
#7
Re: End Select without Select Case, but Select Case exists...
It's a lot simpler, if you want to avoid duplicating a name, to open a recordset "... Where table.UserName = '" & TheNameYouDon'tWantToDuplicate & "'" Then if EOF there's no record with that name - there's no need to loop through the recordset looking for it.
(Name is a reserved word in almost every database, so don't use it as a field name.)
As far as the cancel button in the UDL dialog goes (it doesn't throw an error):
Code:
Dim conn As ADODB.Connection
'...
Set conn = dl.PromptNew
If conn Is Nothing Then
MsgBox "cancelled"
Else
MsgBox "not cancelled"
End If
@Si:
A UDL file is a cheap and easy way to create the connection string. Open it (as a UDL file - double-click on it), fill out the information it needs, close it, open it in Notepad and copy the connection string.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|