Microsoft
Software
Hardware
Network
Question : I have this function, but unable to put results on the form
I want to put the results on a form. Msgbox displays the informatio, but do not know how to transfer the information to my form.
What do I need to do to get the results in my form?
Below is the code:
Option Compare Database
Private Declare Function OpenProcess Lib "Kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function GetExitCodeProcess Lib "Kernel32" (ByVal hProcess As Long, lpExitCode As Long) As Long
Private Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)
Const STILL_ACTIVE = &H103
Const PROCESS_QUERY_INFORMATION = &H400
Private Sub Shell32Bit(ByVal JobToDo As String)
Dim hProcess As Long
Dim RetVal As Long
hProcess = OpenProcess(PROCESS_QUERY_
INFORMATIO
N, False, Shell(JobToDo, vbHide))
Do
GetExitCodeProcess hProcess, RetVal
DoEvents: Sleep 100
Loop While RetVal = STILL_ACTIVE
End Sub
Function findit()
Dim b As String
Dim C As String
Dim D As String
If Dir("C:\tmpp.txt") <> "" Then Kill ("C:\tmpp.txt")
Shell32Bit "command.com /c ipconfig /all > C:\tmpp.txt"
Open "C:\tmpp.txt" For Input As #1
Do Until D = "1"
Line Input #1, b
C = Trim(b)
If Mid(C, 1, 16) = "Physical Address" Then
Line Input #1, b
MsgBox Mid(C, 36, 18)
D = "1"
End If
Loop
Close #1
'If Dir("c:\tmpp") <> "" Then Kill "c:\tmpp"
End Function
Answer : I have this function, but unable to put results on the form
when (on what event) do you want to show the value returned by the function?
me.hold=findit()
Random Solutions
Import a TXT file with >255 fields into Access 2003
sony pc vaio PCV-RS all CD/DVD error code 39
Access 2003 Queries wrongly prompting for parameters
Is there a way of reverting from Windows 7 back to Windows XP? I have a Windows.old folder that has saved all of the main Windows XP folders
Create a Custom Configuration Section with a collection of elements
Count specific records and place the sum value in a field
go to record from main forms OrderID field
After Update in Access
Exporting Reports from Access to Excel
what do I need to do to get resolve error MS Visual Studio 2008 "Could not load file or assembly 'System.EnterpriseServices<wbr />"