Space(512) Question

  • Thread starter Thread starter Rocky5
  • Start date Start date
R

Rocky5

Can any one tell me what does Space(512) do?





' Get the Caption of the SQL Design window
sCaption = Space(512)
lngRet = GetWindowText(hWndOQry, sCaption, 256)
sCaption = Left(sCaption, lngRet)
If Len(sCaption & vbNullString) = 0 Then Exit Function

' Find the window of class ODsk
hwndODsk = FindWindowEx(hWndOQry, 0&, "ODsk", vbNullString)
' If does nto exist then we are not in the Query Design window
If hwndODsk = 0 Then Exit Function
' If this Window is Visible then we are not in the
' SQL View window!
lngRet = IsWindowVisible(hwndODsk)
If lngRet <> 0 Then Exit Function

' Get the Text of the SQL Design window
s = Space(4096)
lngRet = GetWindowText(hWndOKttbx, s, 2048)
s = Left(s, lngRet)
If Len(s & vbNullString) = 0 Then Exit Function
 
Another way to learn about this function is to search for it using Access
HELP.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
And to build on what Jeff said - if you are in the VBA window then you can
just put your cursor somewhere in the function name and hit F1 and help
should take you right to it.
--
Bob Larson

Free Tutorials and Samples at http://www.btabdevelopment.com

__________________________________
 
Back
Top