解密问题 - 不要被标题吓到 [英] decrypting problem - dont get scared by the title
问题描述
我有一个表单,当用户打开报告询问用户是否要解密存储在数据库中的社会安全号时,我将使用该表单。加密/解密的模块工作得很好,但是当我尝试将它应用到命令按钮上的表单(标记为是)时,它会给我一个VB运行时错误 - 运行时错误424 '':需要对象'。我有下面的代码 - 我正在使用MS Access 2003.一如既往,我感谢任何帮助,我可以得到。 (如果我不回答,那只是因为我将离开办公室一个月,我会检查我什么时候回来。再次感谢)
CODE
Private Sub decrypty_Click()
Dim stDocName As String
stDocName =" _RPT_addresslist"
''首先解密
我!SSN = CipherSSN(员工!SSN)
''打开报告显示ss #
DoCmd.OpenReport stDocName,acPreview
结束子
结束代码
其中 CipherSSN 是模块名称, employee 是SSN加密和存储的表, me 是引用自身的报告, me!ssn 是引用报告上ssn文本框的报告。
展开 | 选择 | Wrap | 行号
您可以通过这种方式获取表值。而且我认为你不能在报告中更改文本框值。
试试我!SSN = CipherSSN(我!SSN)
抱歉,这是一个错字...模块名称是 cssn ,函数名称是 CipherSSN ...今天非常忙碌,因为它是我的最后一天。
i have a form that i will be using when the user opens a report that asks the user if they want to decrypt social security numbers stored in the database or not. the module to do the encrypting/decrypting works perfectly, but when i try and apply it to the form on a command button (labeled "yes"), it gives me a VB runtime error - "Run-time error ''424'': Object required". i have the code below - i am using MS Access 2003. as always, i appreciate any help i can get. (if i don''t answer, that is only because i will be out of the office for one month and i will check when i get back. thanks again)
CODE
Private Sub decrypty_Click()
Dim stDocName As String
stDocName = "_RPT_addresslist"
''decrypt first
Me!SSN = CipherSSN(employee!SSN)
''open report showing ss#
DoCmd.OpenReport stDocName, acPreview
End Sub
END CODE
where CipherSSN is the module name, employee is the table where the SSN is encrypted and stored, me is the report referencing itself, and me!ssn is the report referencing the ssn text box on the report.解决方案Expand|Select|Wrap|Line Numbers
You can get table values that way. And I don''t think you can change textbox values in a report.
Try Me!SSN = CipherSSN(Me!SSN)
sorry about that, its a typo...the module name is cssn and the function name is CipherSSN ... very hectic today as its my last day.
这篇关于解密问题 - 不要被标题吓到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文