MAC Address

D

Douglas J. Steele

Check what Randy Birch has at
http://vbnet.mvps.org/index.html?code/network/macaddressremote.htm

Note: Randy's site is aimed at VB programmers. Because of differences
between the controls available for forms in VB and in Access, many of his
examples can't just be copied into Access. Taking a quick look at this
particular code, though, the only thing that jumped out at me was the
reference to Text1.Text in the Command1_Click sub. In Access, you cannot
refer to a control's Text property unless the control has focus. That means
you need either

Private Sub Command1_Click()

Me!Text1.SetFocus
Me!Text1.Text = GetMACAddress("-")

End Sub

or (probably better)

Private Sub Command1_Click()


Me!Text1.Value = GetMACAddress("-")

End Sub
 
J

JJ

Thanks Douglas

Douglas J. Steele said:
Check what Randy Birch has at
http://vbnet.mvps.org/index.html?code/network/macaddressremote.htm

Note: Randy's site is aimed at VB programmers. Because of differences
between the controls available for forms in VB and in Access, many of his
examples can't just be copied into Access. Taking a quick look at this
particular code, though, the only thing that jumped out at me was the
reference to Text1.Text in the Command1_Click sub. In Access, you cannot
refer to a control's Text property unless the control has focus. That means
you need either

Private Sub Command1_Click()

Me!Text1.SetFocus
Me!Text1.Text = GetMACAddress("-")

End Sub

or (probably better)

Private Sub Command1_Click()


Me!Text1.Value = GetMACAddress("-")

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top