Shoutbox

some more VB help :P - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: some more VB help :P (/showthread.php?tid=50725)

some more VB help :P by Reaper on 09-20-2005 at 03:43 PM

lol yet again i have more problems on VB.

Problem 1:

I have added a create user option on my system. i have added a Passkey option so that only people who know the passkey (users of the system) will be able to make an account. I have set it all up, but if i dont type the passkey in the get a "Run-time 13, Mismatch" error but when i do type the passkey correctly it will work fine. I want to get rid of that error
(see the form, "frmNewUser" in the attached file for the code)

SOLVED

Problem 2:

I want to add information i type in on a form in Vb to save in the access database

Note: try not to write me an essay lol. (that means you Cookie :P:P) i have looked around the web, no such luck.

I will update this post with the project


RE: some more VB help :P by Stigmata on 09-20-2005 at 04:16 PM

1) it cant set itself as nothing so just be lazy

code:
Private Sub cmdOK_Click()
    Dim Username As String
    Dim Password As String
    Dim Email As String

If txtPasskey.Text = "12345" Then
    Username = txtUsername.Text
    Password = txtPassword.Text
    Email = txtEmail.Text
    Open Filename For Append As #1
    Print #1, Username & "|" & Password
    Print #1, Email
    Close #1
    txtUsername.Text = ""
    txtPassword.Text = ""
    txtUsername.SetFocus
    MsgBox "User account created"
    Unload Me
Else
    MsgBox "Passkey is invalid"
End If
End Sub


2)
when you go to open the data base. we dont have the same folders as you do, so it would be alot better to add something like:
code:
  db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "\Stock Control 97 Version.mdb;"


and im sorry, but i havnt been able to answer any of the database questions. i dont understand why either :S

RE: some more VB help :P by Reaper on 09-20-2005 at 04:25 PM

part 2 needs more help and ill attach the new project. thanks for part one tho :)

[Edit] I changed the the code for problem one so its now solved, and changed the path to the database for problem 2
i have attached the UPDATED forms, database, etc.

also if you want to login to the program, use this login info:

Username: test
Password: test


RE: some more VB help :P by Reaper on 09-22-2005 at 05:17 PM

bump. i need to get this sorted as its my school project

basically what ive done is scrap the access part and replaced it with another but its done without using the wizard. i.e i set text boxes to get the info from the access form.
but say if i wanted to create a form on VB, it has the same fields and the access form and i typed in new info, how would i go about saving it in the access database instead of another stand alone file?

sorry if its a bit unclear