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

VB6 Login System Urgent Help Needed!

Hi, i am relatively new to visual basic but know some basic concepts.
my current project involves the use of lots of user names passwords and other details on the people involved, i don't know how to make a script that allows the details to be added to a document of some kind (registration) then uploaded to our site or something (Ideally a file that cant be read by the user, for other users sake) and referred to later for logins, also one that is updated to keep up with new users by using a built in update system.

I hope you understand what im getting at and that someone can offer me help in a basic manor that a noob can understand.

Ill answer any questions and explain anything i have missed

Any help at all accepted

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Hi All,
I am working on a VB6.0 / SQL Server Project.Am useing CR8.5 for reporting. Due to some security reasons am not allowed to use a DSN or DSNless connection, wherein it needs to mention the DB Server IP/Name, Database Name, DB Login ID & Password. Is there any way out? Please suggest.


Urgent Help Needed In Crystal Report(very Very Very Urgent)

I am working wiht crytsal reports.My problem is i worked perfectly wiht crystal reports since yesterday.Now i changed my project to another system in lan.And i just copied my entire project along wiht that folder to another system.And that system has no crystal reports.But in installed it now.But my crystal report was not working in this system.It was displaying an error as "Object was unloaded".
What does it means.What happens?

My original system was now affected by virus so i cant even go back.When i copied my folder there was no virus.How can i solve it .

Login System Help
ok lol i got my text file filled with data
im trying to make a simple login so i create an account it enters
username,pass into the file.txt

but when i try to login it says my message

visual basic code:--------------------------------------------------------------------------------
Private Sub Command2_Click()
Dim ff As String
ff = FreeFile()
Dim mystring As String
Dim data() As String
Open "C:/file.txt" For Binary As ff
mystring = Space(LOF(ff))
Get ff, , mystring
data = Split(mystring, ",")
If Text1.Text = data(0) And Text2.Text = data(1) Then
MsgBox ("logged in")
MsgBox ("Wrong username or password")
End If
Close ff
End Sub

data(0) = username and data(1) = pass i tested by printing em : but it still don't work

Login System Help
I am trying to create a program that has a login system that works like this if possible....

In the VB Program the login section has 2 form fields, a Username and Password then a connect button. When you click connect to login and continue onto the next section it checks the username and password on my phpbb forums databse which is a mysql database on my website.
I read some sites that sounds like it might work but it mentions databse ip which I dont know, its on a Yahoo! Geocities Web site services.

Login System
I am looking to create a simple login system that protects certain pages

eg. there are 2 users of the system, i want them to only view 1 sheet, the sheet which holds data about them. So when they click the link taking them to their sheet they have to enter a password first.

This might make it simpler

enter password
access to their data sheet

Ive looked in the help files for some information on this, all i have found is:

Set user = object.CreateUser (name, pid, password)

thanks in advance

Login System
does ne one have even a basic system in which users can make thier own account and password which will be saved in a text or access file im not looking for any thing fancy at all just a basic individual account system


Vb Login System
Hi i'm new to this forum and wondered if any of you could help me with the login system i'm making as part of my coursework.

So far it writes the user info into a text file, but i am having trouble checking the username and password against those stored in the file. this is what i have so far...

User Creation:

If TXTemail.Text = "" Or TXTusername.Text = "" Or TXTsurname.Text = "" Or TXTfirstname.Text = "" Or TXTpass.Text = "" Or TXTpass.Text <> TXTpass2.Text Then

n = n + 1
Users(n).FirstName = TXTfirstname.Text
Users(n).Surname = TXTsurname.Text
Users(n).UserName = TXTusername.Text
Users(n).Password = TXTpass.Text
Users(n).Email = TXTemail.Text

Open "UserInfo.text" For Append As #1
Write #1, Users(n).FirstName, Users(n).Surname, Users(n).UserName, Users(n).Password, Users(n).Email
Close #1

NumberOfRecords = NumberOfRecords + 1

Open "NumberOfRecords.text" For Output As #1
Write #1, NumberOfRecords
Close #1

End If

User Login:

Open "UserInfo.text" For Input As #1
n = 1
Do While (Not EOF(1))
Input #1, Users(n).UserName, Users(n).Password
If TXTusername.Text = Users(n).UserName Then
If TXTpass.Text = Users(n).Password Then
Close #1

End If

End If
n = n + 1
Close #1

Login System Help
Hello, i've been clicked around on your forum and found incredible works from people allover the world, incredible.. I hope you can help me with my project..

I have created a just a simple "Create" form, that creates .txt files into the right folder where i want it, then my question is.. how can i make a login form for it?

And my second question, How can i get it to get "public" so people can
connect to the same server, is it Winsock i'll be using or Mysql??
I just want a simple login system to my program.
So the easiest way will be the best in this case.
Hope you can give me a answer, thanks..
here's the code i use.
Private Sub Command1_Click()
If Len(Dir$(App.Path & Text1.Text & ".txt")) = False Then

Open App.Path & Text1.Text & ".txt" For Output As #1

Print #1, Text1.Text
Print #1, Text2.Text
Print #1, Text3.Text
Print #1, Text4.Text
Close #1

Let Text1.Text = ""
Let Text2.Text = ""
Let Text3.Text = ""
Let Text3.Text = ""
Call MsgBox("text " & Text1.Text & " text ")


Call MsgBox("text " & Text1.Text & " text ")

Call MsgBox(" text , " & Text3.Text & " text")
Exit Sub

End If

End Sub

Login System
I have made a login system that calls to my server for confirmation.
At load up, it prompts the user for Username and Password as shown in the picture.

On my host I have it set up as such -
Username input calls to
Password input calls to

I would like to know if it is possible to load a Excel document to my host so that I do not have to continue to make seperate folders for seperate accounts. I want everything to be on one form, and I want the login function to call to it.

Login System

I now have a simple VB app which code looks like:

PHP Code:

Private Sub Command1_Click()
If Text1.Text = "MyUser" And Text2.Text = "MyPass" Then
Form2.Visible = True
Form1.Visible = False
Else: MsgBox "Wrong Username/Password", vbCritical, "Error!"
End If
End Sub

Private Sub Form_Load()

End Sub

Its 2 textfields, username(Text1.Text) and password(Text2.Text)
And a login button.

When the login button is clicked, it checks whether the username+password are correct. If not, it says wrong username/pass.

But I want to give this to several users, and want to change their passwords at any time.

So for this I thought opening a winsock connection to 2 textfiles, check if the file contains the username/pass, if it does.. then allow them in. If not, give some error.

Can this be done with VB Winsock?
All I need is some kind of simple login system like this, some sample would be great. Thanks in advance, greatly apprecciated.


Urgent Help SQL Login From Vb Net
I am trying to create a login form in application to get server/database/username and password and then update the connection at runtime.
Any idea how to do it?


Making A Login System

I made a program that I am going to be selling, but to stop people from giving it out etc I want to make them need to login.

When they purchase the product I will make them a username and password so they can log on to the program.

The big problem - I dont have a clue how to do it.

Please help

Queries On Login System
hi anyone can tell me how do i write a script to read ms access through mysql language like.

select password from wholetable where username=txtUsername

how do i put this 1 inside the vb code when im using DAO and i hav mounted the history.mdb inside my modules script?

anyone please give me a guide

Login System In Database
Hello, I was hoping someone will be able to help me with this error I'm getting. The error is 2185 and its asking me to setfocus on the textbox I'm writing the code to work with. But the setfocus command doesn't seem to work.

I also need to create user accounts in access for a register system which record users' date and time of log in automatically when they sign in.. I'm notive with coding so I will appreciate any help that anyone can give me.. Thank you!

User Login System?
I know the long way of making a userlogin system:

If text1.text = username
Text2.text = password then
form1.hide and i would have to add a new user manually then update the program.. is there a way i could store usernames and password where, when a new user is added i dont have to recirculate the program?
anyone have ANY clue what im tlaking about?
if so pls help

Problem With My Login System
I have a problem and i need some big help. I have this as my code:

Private Sub cmdOK_Click()
   If txtPassword = "pass" Then
        LoginSucceeded = True
    MsgBox "You have been Shiftified"
        Unload Me
        frmSeizure.Show vbModal
    End If
    If LoginSucceeded = True Then
End If

And this is my problem, i need to add a message box to this and make it able to retry with the password before it goes into the seizure form. More or less i want it to where if you fail to provide the right password it will pop up a message box and warn you and let you retry. BUt if you get it wrong the second time its will pop up another message box then go directly into the form after the message box.

Newbie- Login System

Is there any good reference / source codes where i can actually get information on the following problem,

I need to create a login system (username, password) that actually reads from a text file (separated by comma) to compare the one from the textbox (entered by user). If it is a valid username and password, then proceed to the next form. This is relatively easy using a database access method, however i have to deal with files this time around. Any help please.

Thanks a lot.

System Login User
Dear All,

I want to verify in my vb program, whether the windows login user login to the vb application. That is , if someone login to the windows using his username , only that person should login to the VB application as well.

Can u tell me the way i should read the system variables when i logging to the VB application.


How To Get System Login Time Using VB
i want to create a VB application that will record the system time each time a new user logins to the system.

Help Needed! Login &amp; Accessing Secured Website Using Vb 6
Dear Pros

i am working on an integration software. the scenario is, i have to upload (post) a batch file to a secure website in background and user wont see the interface of website.
i have used webbrowser tool to connect to website. i am successful in login but before that a security passport certificate is being asked.
my questions are :
1) how to execute security passport certificate
2) how to track sessionid of login
3) how to access or navigate further to reach to a perticular page
note : the website is menu driven

i requesst u please help me with some code or samples

thanks in anticipation


Login &amp; Logout Informationfrom The System
hi ,

     i am(new Vbcity baby) doing the application in Vb.
i want to get login information of the users,
1.I want to get login name of the user and when does he logged in the System (Time) and same for Log-Off

Its urgent



Help Whit A Login System To My Webbrowser
hey.. all great vbcity ppl
i have a littel prob. i have made a xhtml app. and want a login..

i want 2 tekst box, 1 to the username, and 1 to the password. and when i click it will send this line if i have writen kasper ind the username box and 123456 in the passwordbox

auth.send "gebruikersnaam=kasper&wachtwoord=123456&login=Login"
Private Sub Command1_Click() "POST", ""

auth.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

auth.send "gebruikersnaam=USERNAME&wachtwoord=PASSWORD&login=Login"

file = auth.responseText

If InStr(file, "logged in") Then
Text1.Text = Text1.Text & "Logged In" & vbNewLine
Text1.SelStart = Len(Text1.Text)
Text1.Text = Text1.Text & "Failed To Login" & vbNewLine
Text1.SelStart = Len(Text1.Text)
End If
End Sub

Help Needed Fast With Database Driven-login Page

i just started using vb6 a month ago and i need to design a database-driven login page, the code i have works but when i try to put in a usename and password nothing happens, can someone tell me what i did wrong and what i need to do.

Option Explicit

Public conn As New ADODB.Connection

Public recset As New ADODB.RecordSet

Public fld As ADODB.Field

Public sqlstr As String

Public Sub InitRecSet(rs As ADODB.RecordSet, cn As ADODB.Connection)
        With rs
            .ActiveConnection = cn
            .CursorType = adOpenKeyset
            .LockType = adLockOptimistic
        End With
End Sub

Public Sub InitConnection(cn As ADODB.Connection)
    With cn
        .ConnectionTimeout = 30
        .CommandTimeout = 30
        .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                             "Persist Security Info = False;" & _
                             "Data Source = " & "C:/cs450.mdb"
    End With
End Sub

Dim username As String
        Dim password As String
        password = txtpass.Text
        username = txtuser.Text

End Sub

i am not sure it is complete please help someone, i need it immediately


Need Urgent Help Regarding Crystal Report Login
I am currently using vb6 and crystal report 8 and sql server2000 as backend with my o.s. being win xp

i have developed which uses cr8 as its reporting tool

the Sql server is installed on this machine itself so it uses the (local) as server name (But during installation I provided the name as ashm)

Now when i connect to server then there is no problem

I use the foll code for crystal report

Dim app1 As CRAXDRT.Application
Dim rep As

Set app1 = New CRAXDRT.Application

Set rep = app1.OpenReport(App.Path & "
eportscostbenefit1.rpt", 1)

app1.LogOnServer "p2ssql.dll", Module1.server, "compseller", Module1.username, Module1.pass

module1.server contains the value "(local)"

Now my friend took my whole project to his home and he installed the same setup which i am using

His compuer configuration is also same
vb6 and crystal report 8 and sql server2000 as backend with my o.s. being win xp

Now when he runs the project it works fine but he is not able to access the crystal report from the project

Their is an error which is

'Server Not yet open'

his server name is arnsn

But since the server is on local machine it takes server name as (local)

The same code works fine for me But not on my friends machine with same configuration.
Where can be the problem.

Urgent! How Can VB Login The Proxy Server?
Urgent! How can VB Login the Proxy Server?

Access Table In Database(Login System)
Yello. I'm making a software for a friend. But inorder to start using the software, a user must be registered.

The problem which i'm having so far is getting the username and password from database.

I need some help with this.

I am creating a Helpdesk system in Access and I would like to create a simple login system. I would have a login table with the Fields "USER ID", "PASSWORD", "ACCESS LEVEL" and "STAFF ID". When someone enters the database I would like a form to pop up which would request the user to enter their ID and password. What I need the login system to be able to do is:

1)Check that the user ID and password match from the login table
2)Direct the user to a form dependent upon their access level (there will be a form for helpdesk users and a unique one for the helpdesk manager ie. 2 acess levels)
3)Store the user ID the user logged in with in a temporary table (known as a control table in Delphi) whilst they are logged in such that for example an object on the form could display the logged in user's name (a staff ID in the login table allows a relationship between it and a STAFF table to be made).

I'm sure that this would require VBA programming of some sort but am a novice when it comes to VBA!

Problem If UserId Does Not Exist When Login To The System.
I have login form with txtUserId, txtPwd and txtDept. I can successfully login to the system with UserId and Password whereby the Dept will automatically displayed on the form. But i'm having problem when the UserId entered is incorrect. It gives me an error,

This is what i've done,

Private Sub Form_Load()
  Set Adologin = New Recordset
  Adologin.Open "select user_id,password, dept from
         tbluserlogin", db, adOpenStatic, adLockOptimistic
End Sub

Private Sub cmdOK_Click(Index As Integer)
    Do Until Adologin.EOF
        usercode = Adologin.Fields("user_id").Value
        If usercode = txtUserid.Text Then
            Exit Do
        End If
    If Not Adologin.EOF Then
        Pass = Adologin.Fields("password").Value
        If Pass = txtPassword.Text Then
                Unload Me
            MsgBox "Password is incorrect!", , "Warning!!"
            Exit Sub
        End If
        MsgBox "User ID was not found.", , "Warning!"
    End If
End Sub

Private Sub txtpassword_GotFocus()
    Set Ado = New Recordset
    Ado.Open "select dept from tbluserlogin Where user_id
             ='" & txtUserid.Text & "'", db, adOpenStatic,
    txtDept.Text = Ado.Fields("dept").Value
End Sub

what i need is to display the relevant department when the user inputs his/her userID.

it works if i enter correct user id (either with correct pwd or wrong pwd), but if the user id is incorrect, this error comes out,

Run-time Error '3021':
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

when i click on Debug button, it goes to this line,

txtDept.Text = Ado.Fields("dept").Value

any idea?
thanx in advance..;)

Please Help Me! Urgent Help Needed

I have very good knowledge using the winsock control, but i am now attempting to create a chat room application for my brothers forums.

I want a login screen that checks the username and password to see if it matches up with a username and password at the forums.

Hope that makes sense, its still early in the moring and im tired..

Thanks in advance!

Urgent Help Needed

I am writing an excel program. How do I write a program code that will pop up a message immediately when the value in a certain box exceed the required value?
For example, if I want to sum the numbers in boxes A1 and B1, and the result of their sum to appear in box C1, but do not want the result of their sum to be greater than 50. I need the program to alert the user immediately when the value in box C1 exceed 50. How do I write the program code?


Urgent Help Needed!
Hi Robert,

I hope you can help me out with a problem that I am currently facing.
I have a main form known as "frmDcDocument" and from this form I am calling another form "frmDcSelectProduct".

In frmDcSelectProduct form I have two listboxes. The user can select products in the right listbox and and add them to the left listbox. These values are then saved in the database.

Everything is going ok till now.
I am calling the second form "frmDcSelectProduct" from the main form "frmDcDocument".

The code is :

Private Sub cmdEdit_Click()

Dim selectproductfrm As New frmDcSelectProduct
Dim i As Integer

Set selectproductfrm.securityUtil = securityUtil

Set selectproductfrm.perObj = perObj

selectproductfrm.Show vbModal, Me

For i = 0 To selectproductfrm.MyList2.ListCount - 1

MyList1.AddItem selectproductfrm.MyList2.List(i)

next i

Set selectproductfrm = Nothing

End Sub

The only problem is that whenever I click on the command button cmd_Edit, all the values in the MyList2 (which is located in the frmDcSelectProduct) are added to the MyList1 (in the main form..frmDcDocument).

For example, both the forms have "billy" saved in the list boxes "Mylist1" and MyList2". when i click on the Cmd_edit button which inturn calls the frmSelectProduct, "billy" is again added to MyList1 even if I press the "Cancel button".

The values are saved only once and its not the problem that multiple values are saved ("billy" is saved only once in both the listboxes). Its just that all the time I call the other form, all the items are listed from Mylist2 to MyList1.

Would greatly appreciate your help and wish you a pleasant evening!



Urgent Hlp Needed Plz
i have a table 3x3 that needs to be populated by O's and X's now the first time i click on any cell an X should be displayed the a O so im usin a boolean procedure to try to diferentiate between the 2 here is the code so far

Private Sub BooleanProcedure()

If PlayerInput = True Then
grdOandX.Text = "X"
grdOandX.Text = "O"
End If

End Sub

Private Sub grdOandX_Click()

c = 1
For c = 1 To 9 Step 1
grdOandX.Text = PlayerInput
Next c


End Sub

now wen the table is full i need to call a sub called endgame which gives a pop up msgbox. so i need it to count to 9 so when it hits 9 the sub is called



Urgent Help Needed!
I am creating an MDI HTML Editor, and when you select the View->Tag Defined menu option, it changes the colour of the HTML tags on the active document. Well that's what I want it to do.

I don't know if I need to make the Sub private or public or where to stick it and how to call it! PLeas help, I need to show this at an interview tomorrow!

Here's the code:


Private Sub ColourHTML(RTF As RichTextBox)
If fMainForm.ActiveForm.Tag = "TagDefinedTrue" Then
'Debug.Print ActiveForm.Tag = "TagDefinedFalse"
End If
If fMainForm.ActiveForm.Tag = "TagDefinedFalse" Then
Dim sHTML As String
Dim nTagOpen As Long
Dim nTagClose As Long
Dim nI As Long

Dim nSelStart As Integer

Dim stQuote As String
stQuote = Chr(34)
sHTML = ActiveForm.rtfText.Text
nTagClose = 1
fMainForm.ActiveForm.rtfText.SelStart = 0
With ActiveForm.rtfText
For nI = 1 To Len(sHTML)
' *** See where the next tag starts.
nTagOpen = InStr(nTagClose, sHTML, "<")
If nTagOpen = 0 Then Exit For

' *** See where the tag ends.
nTagClose = InStr(nTagOpen, sHTML, ">")
If nTagOpen = 0 Then nTagClose = Len(sHTML)
If nTagClose = 0 Then nTagClose = Len(sHTML)
' *** Color the tag.
.SelStart = nTagOpen
.SelLength = (nTagClose - 1) - nTagOpen

.SelColor = &H990000
.SelStart = nTagClose + 1

.SelColor = &H0&
.SelStart = 0

nTagClose = 1
For nI = 1 To Len(sHTML)
' *** See where the next tag starts.
nTagOpen = InStr(nTagClose, sHTML, stQuote, vbBinaryCompare)
If nTagOpen = 0 Then Exit For
' *** See where the tag ends.
nTagClose = InStr(nTagOpen, sHTML, stQuote, vbBinaryCompare) 'Or InStr(nTagOpen, sHTML, stQuote & ">")
If nTagOpen = 0 Then nTagClose = Len(sHTML)
If nTagClose = 0 Then nTagClose = Len(sHTML)

If nTagClose <= nTagOpen Then
nTagClose = nTagClose + 1
End If
' *** Color the tag.
.SelStart = nTagOpen - 1
.SelLength = nTagClose - nTagOpen
.SelColor = vbRed

.SelStart = nTagOpen

.SelColor = &H0&
.SelStart = 0
nTagClose = 1
For nI = 1 To Len(sHTML)
' *** See where the next tag starts.
nTagOpen = InStr(nTagClose, sHTML, "<!--")
If nTagOpen = 0 Then Exit For

' *** See where the tag ends.
nTagClose = InStr(nTagOpen, sHTML, "-->")
If nTagOpen = 0 Then nTagClose = Len(sHTML)
If nTagClose = 0 Then nTagClose = Len(sHTML)
' *** Color the tag.
.SelStart = nTagOpen - 1
.SelLength = (nTagClose + 3) - nTagOpen

.SelColor = &H999999

.SelStart = nTagClose + 1

.SelColor = &H0&

End With

fMainForm.ActiveForm.Tag = "TagDefinedTrue"
End If
End Sub
Then I should use
ColorHTML rtfText
to call it.

I originally had it on ActiveForm's Activate Property, so as soon as I opened the doc I could see if it changed colours.

However, I dont want that in reality, I want the user to choose if they want the Tags coloured or not adn I can't figure it out.

I tried creating a menu system for the Child Windows, and it worked in there, but then I couldn't work out how to call the proper Parent menus for Open etc.

I dont understand the variable definition thing - Im used to Global var as something and the whole program can use it.

PLease help.


PS Where it Says
that wasnt originally there, I thought it would help - so please correct that for me to.

Thanks so much

I'm desperate

Urgent Help Needed
hi all

my aim is to get the character count of a word document

without opening it. I used word object and took the word count

but it is not the same when i opened the document and

compared with it. any one having any idea please share with me.

any response will be appreciate.


Urgent Help Needed!!
Hi Guys/Gals!!

I Am New Hear And Very New To 'Visual Basic'. I Am Using 'Visual Basic 6.0 Pro Edition' And I Have Been Given A Project From College To Do And I Am Extremely Stuck!!

Can Someone PLEASE Help Me Out!!

Ok Here Is The Scenario:

I need to design a 'Lottery Simulation'. There will be SIX numbers in the lottery and they are numbered from 1-49. They MUST appear randomly and no number must come out twice!! A User can only enter the lottery 3 times.

I then need the program to show either on screen the results or by sending the results to a file of winning entries.

I would also like all the winning lines to be stored on a file.

If ANYONE can help in ANYWAY I will be truly GRATEFUL!!

Kind Regards

Please help... I have a book report due monday, and it is presented as a VB app. Well, I burned my program onto a CD-R, then I tested it on another computer. I have a sound that plays, but it won't play. And, some images won't appear (on another computer). The sound plays by means of the WMP control, and the images are rotated through timers.

For the sound, I used the WindowsMediaPlayer1.Open App.Path & "/2.wav". On the other computer, you can't even press the PLAY button. And, for the images, I do: atompics.Picture = LoadPicture(App.Path & "/atom4.jpg")
- I also tried taking out the "/". Help.... please....
I got some help on the chat channel... I'm testing it now. Just wait till I edit the post again.
****EDIT ON EDIT*****
Ok, it doesn't work. Now you can post suggestions.

Urgent Help Needed... Ocx Dll

i use Microsoft ActveX Data Objects 2.0 Library in my project
and this is the only reference i have added. how can i run my app
with out making an installation file ?
the file i refered is msado20.tlb. i copied the file to another sys
and then tried to run it... it gives me an error on provider..!!!
if i use regsvr32 it says itz not a ocx or dll....!!!
how can i solve this... !!!!
may be i am mad.... but might be there is a solution 4 this..

thx in advance

Urgent Help Needed SQL
i used to compare 2 values. 1 in the DB and the value the user entered.

I Used this

InStr(1, CaptionDB.Recordset!Seller, Trim(SearchField))

but know i want to use a SQL query instead.

I cant use:

SQL$ = "SELECT * FROM TransactionData WHERE Seller = '" & Trim(SearchField) & "'" because maybe the user enters "SMITH" and then no record contains "SMITH" But intead it may contain "NATIONAL SMITH TRUCKING" so i need something that can search for a peace of string in a large string

please help
any ideas welcome


URGENT Help Needed...again...please?? :)
Hey there pplz!

I need to know some code that will randomise the questions i have in a question database i have set up...but of the 20 questions i, i only want to have ten questions displayed. I fugured i needs a loop in there somewhere but i am not sure where to chuck it in.

The code i have here already displays the first question from the database, but when i click the 'next question' button, i need the next question to be displayed as well as adding a value to a total (from when the user chooses and option)

Here is the code:

Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset
Dim Q As String
Dim Op1 As String
Dim Op2 As String
Dim Op3 As String
Dim recSearchResults As ADODB.Recordset

Public Sub Form_activate()

Set MyConn = New ADODB.Connection 'Connection to database is initialised
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = Z:Cheong2690Major Project Yr 12Question.dtb.mdb;"
Set MyRecSet = MyConn.Execute("SELECT Question, Option_One, Option_Two, Option_Three FROM TableQuizOne")
Q = MyRecSet("Question")
Op1 = MyRecSet("Option_One")
Op2 = MyRecSet("Option_Two")
Op3 = MyRecSet("Option_Three")
lblQuestion.Caption = user_name & Q
lblAnswerOne.Caption = Op1
lblAnswerTwo.Caption = Op2
lblAnswerThree.Caption = Op3
End Sub

Private Sub cmdNext_Click()
Select Case AnswerChosen
Case 1
If opOne = True Then
total = total + 2
End If
Case 2
If opTwo = True Then
total = total + 4
End If
Case 3
If opThree = True Then
total = total + 6
End If
End Select
End Sub

I appreciate any help that i can get.

Thankies muchly.

Urgent Help Needed!!
i have a sql database to which i connect using a vb application

i want to know how to take back ups of this database

how do i do it through the vb application

i am using sql server 2000 and vb 6.0

Urgent Help Needed!
I have an issue regarding updating multiple columns inside an Access Database. These columns need to be updated via VB5. My theme is attractions, so in my database I have columns like entry Price, Description and opening/closing times. On my form in VB5, I have text boxes to display each of these things i.e. txtDescription and txtOpeningClosing. Currently I can only update the entryPrice column in access. When i try adding code to update description (for example) it does not update. I was wondering if someone could help me with my code. My code looks like this:

Private Sub btnSaveChanges_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaveChanges.Click

Dim strSQL = "UPDATE Attractions SET EntryPrice = '" & txtEntryPrices.Text.Trim & _
"' WHERE AttractionName = '" & lstAttractionNames.Text & "'"
Dim objCommand As New OleDbCommand(strSQL, objConnection)


End Try

End Sub

How do I add for example, description and opening/closing times into this code and get it working?

Help much appreciated

VB Help Needed - URGENT
How to extract information from a microsoft access database using VB codes?
Do we place msgsent table in main or sub main?

Urgent Help Needed
what i need to do is run test.exe then hide it then have it click the ok button then have it enter the info i have pre-defined in the code, then once it is accepted it needs to be unhidded

i coded it myself but as i am only new to coding it does not work, the code i tryed is below, if anyone could either re-code or fix up my existing code that would be brilliant.

if command1 = "Ok" Then Click command1 Then text1.txt = "Name" and text2.txt = "Key"
Then Click "Ok" And

if command1 = "Enter Key" Then Click command1 Then text1.txt = "Name" and text2.txt = "Key"
Then Click "Ok" And

msgbox "Enjoy" And

Here is my code:

If S5Form.Visible = False Then
S2Lbl(5).Caption = S2Lv.SelectedItem.Index
PrevCaller = Caller
Caller = "PmtDue"

S5Form.Show vbModal
If Unload_YourSelf Then
Unload Me
If PD_reread = True Then
Get_payments (PDBtnNo)

PD_reread = False
End If
End If

Caller = PrevCaller
MsgBox ("PURCHASE ORDER (Contract) SCREEN is already opened. Please close all PURCHASE ORDER SCREENS then try again.")
End If

When the program reaches to this statement:
If S5Form.Visible = False Then

instead of checking to see if the S5Form is visible or not, it is actually displaying my S5Form.

Please let me know what I am doing wrong.


I am trying to print a size 10 envelope but don't know what should I set my printer.papersize.

Right now it says printer.papersize = A4 which is the letter size paper.

Please help.

Urgent Help Needed
-- Deleted --

Urgent Help Needed
Hey guys,

I want to make it so i can enter three exam subjects, then the mark of the exam and click a button to convert the mark into a grade e.g. A, B, C etc.

If someone would be able to give me the code to link an exam subject text box to an exam mark text box and make it be converted into a grade by pressing a command button. That would be great, i just need it for one then i can use it for the others.

mark boundaries are:

0 to 39 grade U
40 to 59 grade C
60 to 79 grade B
80 to 100 grade A

I would really appreciate anyone who helps with this

Urgent Help Needed!
I accidently just put myself into an infinite loop of msgboxes and I forgot to save before I ran the program. Now I've done a LOT of stuff to the program since the last save and I really don't want to lose it. So is there ANY way to stop the msgboxes from coming up and let me Stop the program?

Thanks a freakin ton in advance! Oh god I hope there is.

Urgent Help Needed
this time i have come up with some new pb. actually i don't know if it is possible or not.i have a prg written in c thru which u send command and the bulb on the circuit glows.there r a provision of 8 bulbs.board has been connected to the port of is working fine.

now can i make the project work online i.e on net ? is it possible to send command from some other pc on internet and the system having board interfaced(at home) works the same i need to convert the project in vb or will it do? is it possible that thru some pc on net i can make the bulb glow at the board (connected to my pc at home)

do reply


Copyright 2005-08, All rights reserved