Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Compare Database
  2. Function q1(par, par1)
  3. q1 = par & " __" & par1
  4. End Function
  5.  
  6.  
  7.  
  8. Function find(x)
  9. Dim y As String
  10. y = "rw"
  11. y = DLookup("pib", "spysok", "pib='" & x & "'")
  12. If y = "rw" Then
  13. MsgBox ("íåìà")
  14. Else
  15. MsgBox (y)
  16. End If
  17. End Function
  18.  
  19.  
  20. Function nowa(par As String)
  21.  
  22. Dim db As Database
  23. Dim r As Recordset
  24. Set db = CurrentDb()
  25. Set r = db.OpenRecordset("select * from email")
  26.  
  27. db.Execute "update email set email='" & par & "' where id=0;"
  28.  
  29.  
  30. End Function
  31.  
  32. Function delet(idn)
  33. Dim db As Database
  34. Dim r As Recordset
  35. Set db = CurrentDb()
  36. Set r = db.OpenRecordset("select * from email")
  37.  
  38. db.Execute "delete from email where id=" & idn & " ; "
  39. End Function
  40.  
  41. Function plus(par, num, mail As String, prym As String)
  42. Dim db As Database
  43. Dim r As Recordset
  44. Set db = CurrentDb()
  45. Set r = db.OpenRecordset("select * from email")
  46.  
  47. db.Execute "insert into email values(" & par & "," & num & ",'" & mail & "','" & prym & "');"
  48. End Function
  49.  
  50. Function zaput()
  51. DoCmd.OpenQuery "Zaput1"
  52.  
  53. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement