CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

12Next
Return to list New
View: 7523|Reply: 22

microsoft access..tolong!!

[Copy link]
Post time 7-7-2004 01:31 PM | Show all posts |Read mode
aku tengah wat sistem utk unit aku..sistem simple jek.. dan aku gunakan microsoft access..aku cadang nak wat sistem nih nampak best sket..so bagi sesapa yg ada tips berguna utk access tuh rajin2laa kongsi..

1st yg aku nak tanya, camna nak wat login dan password utk user...kat mana nak carik function nih...hanya org tertentu je yg leh masuk dlm access kita..

kat mana leh dapat tutorial tambahan utk access nih..tutorial selain yg basic2 tntg access nih...
kalo ada soklan lagi aku posting kat sini je...
Reply

Use magic Report


ADVERTISEMENT


 Author| Post time 8-7-2004 01:14 PM | Show all posts
tader sapa nak respond ke..tolonglaa aku!!
Reply

Use magic Report

Reign This user has been deleted
Post time 8-7-2004 06:09 PM | Show all posts
maaf! aku tak tau guna access ni, kalau tak de respond, takde yang tau kot.
Reply

Use magic Report

Post time 9-7-2004 02:05 PM | Show all posts
ada yang tau cuma kena tunggu dululah.... maybe diorang tangah fikir
Reply

Use magic Report

Post time 9-7-2004 03:45 PM | Show all posts
sat aaa... nanti aku carik kat mana aku letak link utk blajo access ...
Reply

Use magic Report

Post time 9-7-2004 03:56 PM | Show all posts
Reply

Use magic Report

Follow Us
Post time 26-7-2004 02:07 PM | Show all posts
emm aku try tolong yg mane aku bleh lah yek..
firstly ko kenalah ader table yg ko nak simpan name user tu..
pastu ko buat lah checking sama ada nama yg ko key in tu ader tak dalam table..
ade dua cara :

1.Coding tu kat button 'enter' atau..
2. Button enter tu memanggil module utk buat checking.

Coding dia lebih kurang mcm ginilah :
// ini kalu ko panggil module

Function CheckSecurity(txtUserName As String, txtPassword As String)

Dim rsttblSecurity As DAO.Recordset
Set rsttblSecurity = CurrentDb!tblpassword.OpenRecordset // tblpassword = table yg ader name user tu..
rsttblSecurity.MoveFirst
Do While Not rsttblSecurity.EOF
If rsttblSecurity!UserName = txtUserName Then
    If rsttblSecurity!Password = txtPassword Then
   
   
    stDocName = "frmMainMenu"
   
    'stLinkCriteria = "[UserName]=" & "'" & Forms!frmPassword![txtUserName] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Else
    MsgBox "Invalid Password!!!"

    End If
  
End If
rsttblSecurity.MoveNext
Loop
rsttblSecurity.Close

End Function

cube try ek..:ah:
Reply

Use magic Report

Post time 26-7-2004 05:38 PM | Show all posts
:hmm: ehmm cuba tgk help ... atau ko pakai wizard ... atau ko amik sample dari northwind db tuh .. pas tuh ko manipulate laa ikut requirement unit ko tadi ... cangne ? :hmm:
Reply

Use magic Report


ADVERTISEMENT


Post time 27-7-2004 09:21 AM | Show all posts
encek... tu skrip buat vb tu... ekekeke... ms access kalau nak buat validation untOk password ko kena buat file macro dia... ntah ler... aku pun dah lama tak pegang access... ekekeke... :lol
Reply

Use magic Report

Post time 27-7-2004 11:32 AM | Show all posts
Originally posted by cipOt_cedOt at 27-7-2004 09:21 AM:
encek... tu skrip buat vb tu... ekekeke... ms access kalau nak buat validation untOk password ko kena buat file macro dia... ntah ler... aku pun dah lama tak pegang access... ekekeke... :lol



ler..kan access tu adik beradik vb..
dlm acces tu adalah VBA sebenarnya..
memanglah ko bleh guna macro tapi kalu nak buat checking kene gune code VBA ni..
Sama gak ngan excell, disebalik excell yg biasa kita dok pakai tu ader coding vb sebenarnya
Reply

Use magic Report

seek1u This user has been deleted
Post time 28-7-2004 01:24 AM | Show all posts
yup agreed..

vba lah yg mengerakkan macro utuk semua ms office product termasuk access ,

excel , words  dan power point..

vba mmg adik beradik ngan vb..tp tak sama..cth..cam ku ..leh buat vba utuk

excel..tp bila ko bagi access..aku kantoi..sama gak utk buat words etc..

tu yg susah sket vba ni..hehe..
Reply

Use magic Report

seek1u This user has been deleted
Post time 28-7-2004 01:31 AM | Show all posts
sorry ni ff: actually..

tp cuma nak bagi perbandingan buat excel punya password form utntuk restrict

access certain user je..hanya contoh..maybe senah leh nampak sesuatu dari sini

tentang penggunaan vba dalam access pulak..hopefully



  1. Option Explicit
  2. Public SaveWB As Boolean
  3. Public CloseWB As Boolean


  4. Sub Close_WB()
  5. CloseWB = True
  6. SaveWB = True
  7. ThisWorkbook.Close
  8. ThisWorkbook.Save
  9. End Sub


  10. Dim i As Integer


  11. Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
  12. If KeyCode = 13 Then
  13.   If i = 2 Then
  14.      MsgBox "That's 3"
  15.       Unload Me
  16.    End If
  17.    
  18.   If TextBox1 = "1234" Then
  19.       MsgBox "Correct password"
  20.         Else
  21.          i = i + 1
  22.   End If
  23.      
  24. End If
  25. End Sub

  26. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
  27. If CloseMode = vbFormControlMenu Then
  28. MsgBox "Maaf , anda perlu tahu password untuk menutup form ini", vbCritical, "KURT"
  29. Cancel = True
  30. End If
  31. End Sub

Copy the Code

[ Last edited by 蝯z坞悬衻 on 28-7-2004 at 01:33 AM ]
Reply

Use magic Report

seek1u This user has been deleted
Post time 28-7-2004 01:35 AM | Show all posts
ok..back to the topic..maybe i have found something..plz dont ask anything..i

dunno anything aboiut access:lol

i found this via search from google try it..:




  1. ' Declare for call to mpr.dll.
  2. Declare Function WNetGetUser Lib "mpr.dll" _
  3. Alias "WNetGetUserA" (ByVal lpName As String, _
  4. ByVal lpUserName As String, lpnLength As Long) As Long

  5. Const NoError = 0 'The Function call was successful

  6. Public Function GetUserName()

  7. ' Buffer size for the return string.
  8. Const lpnLength As Integer = 255

  9. ' Get return buffer space.
  10. Dim status As Integer

  11. ' For getting user information.
  12. Dim lpName, lpUserName As String

  13. ' Assign the buffer size constant to lpUserName.
  14. lpUserName = Space$(lpnLength + 1)

  15. ' Get the log-on name of the person using product.
  16. status = WNetGetUser(lpName, lpUserName, lpnLength)

  17. ' See whether error occurred.
  18. If status = NoError Then
  19. ' This line removes the null character. Strings in C are null-
  20. ' terminated. Strings in Visual Basic are not null-terminated.
  21. ' The null character must be removed from the C strings to be used
  22. ' cleanly in Visual Basic.
  23. lpUserName = Left$(lpUserName, InStr(lpUserName, Chr(0)) - 1)
  24. Else

  25. ' An error occurred.
  26. MsgBox "Unable to get the name."
  27. End
  28. End If

  29. ' Display the name of the person logged on to the machine.
  30. 'MsgBox "The person logged on this machine is: " & lpUserName
  31. GetUserName = lpUserName

  32. End Function
Copy the Code
Reply

Use magic Report

Post time 28-7-2004 09:28 AM | Show all posts
Originally posted by 蝯z坞悬衻 at 28-7-2004 01:24 AM:
yup agreed..

vba lah yg mengerakkan macro utuk semua ms office product termasuk access ,

excel , words  dan power point..

vba mmg adik beradik ngan vb..tp tak sama..cth..cam ku ..leh buat ...



:setuju:..walaupun secara asasnya product Ms Office ni guna VB code tapi utk setiap application coding nyer berbeza. Kalu ms Access dah ade template dia maksudnya tak jauh sangat ngan vb tapi kalu excell ..pergh plain sheet utk coding.. kiter kene define sendirik....
kenkadaang mase keje tu terpikir aku, terrornya sapa yg buat ms Opis nye application ni kan...cam ner lah dorang bleh terpikir nak buat application cam ni.. Salute aku..:solute:
Reply

Use magic Report

Post time 28-7-2004 11:25 AM | Show all posts
penah buat projet pakai vb ngan access ni... buat database untOk library... dah berapa tahun dah... langsOng luper... ekekeke... :lol
Reply

Use magic Report

Post time 18-8-2004 05:56 PM | Show all posts
Ada lagi yang baca thread ni? Kalau ada saya kasi my 2 cents' worth...

1. Create table USER, masukkan 2 field (username dan password). Kalau nak buat primary key or add additional fields terpulang.

2. Create satu form, dalam form tu add 2 text box and 1 command button. Namakan text box pertama as: txtUsername, dan text box kedua as: txtPassword. Command button tu namakan dia sbg cmdLogin.

3. Pada butang cmdLogin tu, pada window Properties, kita set event On Click, dan select Code Builder (apabila butang tiga titik tersebut ditekan).

4. Kodkan seperti berikut:

dim rs as new adodb.recordset
rs.activeconnection = currentproject.connection
rs.open "select * from [user] where [username] = '" & me.txtUsername & "' and [password] = '" & me.txtPassword & "'"

if not rs.eof then
' --- rekod dijumpai ---

else
' --- rekod tak jumpa ---
   msgbox "Maaf, kata laluan salah."

end if




Harap dpt membantu.

[ Last edited by shahnazz on 18-8-2004 at 05:58 PM ]
Reply

Use magic Report


ADVERTISEMENT


seek1u This user has been deleted
Post time 21-8-2004 12:15 AM | Show all posts
tokey thread ni pun dah lama ilang
Reply

Use magic Report

eye2kay This user has been deleted
Post time 9-9-2004 10:37 AM | Show all posts
Originally posted by 蝯z坞悬衻 at 21-8-2004 00:15:
tokey thread ni pun dah lama ilang


DUDE.. ko kat sini rupanya... ko buat programming lak ke??
Reply

Use magic Report

 Author| Post time 17-9-2004 10:54 AM | Show all posts
[quote]Originally posted by 蝯z坞悬
Reply

Use magic Report

seek1u This user has been deleted
Post time 17-9-2004 11:42 AM | Show all posts
Originally posted by eye2kay at 9-9-2004 10:37 AM:


DUDE.. ko kat sini rupanya... ko buat programming lak ke??


kecil2 an je.hehe..:bgrin:
Reply

Use magic Report

12Next
Return to list New
You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT


Forum Hot Topic

 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

28-12-2024 10:35 PM GMT+8 , Processed in 0.256833 second(s), 33 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list