PDA

View Full Version : انتخاب موضوع از جدول کمبو



fatimah
چهارشنبه 18 مرداد 1385, 21:15 عصر
سلام دوستان
توی تکه برنامه ای که پیوست کردم ، نمیشه که موضوع رو از جدول کمبو انتخاب کرد .
یعنی جستجو رو بر اساس اون انجام نمیده . میشه لطف کنین بگین اشکالش چیه ؟

powerboy2988
چهارشنبه 18 مرداد 1385, 21:20 عصر
age mitoni alan behem pm bede behet begam
powerboy2988@yahoo.com

fatimah
چهارشنبه 18 مرداد 1385, 21:25 عصر
دوست عزیز اگه امکانش هست همینجا بهم بگین . ممنون

powerboy2988
چهارشنبه 18 مرداد 1385, 21:28 عصر
vaghti ke mikhay fielde table ro besazi, vaghti feild name ro moshakhas kardi, data type fieldeto az noe lookup wizard... bezar.
bad ke inkaro mikoni ye panjere vasat baz mishe ke 2ta entekhab dari ke shoma 2vomio entekhab mikoni yani ino("I Will type in the value that I want").
dar panjerey badi fielday Combo ro vared mikoni be hamin rahati.
darzemn in kari ke shoma kardi hichkodom az Combohat be database shoma motasel nabod

powerboy2988
چهارشنبه 18 مرداد 1385, 21:35 عصر
be darded khord?

powerboy2988
چهارشنبه 18 مرداد 1385, 21:44 عصر
rasti vase on moshkele harekate wheel mouse roye recordet mitoni on file DLL ro("MouseHook.dll") kenare file accesset dashte bashi.
vaseey dastresi be codesh az ghesmate form in formo("frmSampleDataTABS") rosh click rast kon az onja boro be ghesmate design form
badehs ke toensti on formo design koni roye button("Stop MouseWheel") dobare click rast mikoni miri to ("ild event") code barname onjast


omid varam sareto dard nayavorde basham

fatimah
چهارشنبه 18 مرداد 1385, 21:58 عصر
سلام
خیلی خیلی ممنون .
ولی کاش فارسی تایپ کرده بودین . خوب ...
بابت کمبو :
من باید با استفاده از جدول این کار رو انجام بدم . یعنی این طوری از من خواستن . اون طوری که شما دوست عزیز توضیح دادین رو

انجام داده بودم ولی مورد قبولشون نبود . خواهشن اگه اون طوریش راهی داره توضیح بدین .
بابت weel mouse :
ممنون از راهنمایی کاملتون . حالا من باید این کد رو

Private Sub Command14_Click()
Dim blRet As Boolean
blRet = MouseWheelOFF(True, False)
Me.txtStatus.Value = "The MouseWheel is turned OFF except for ListBox controls, TextBox

controls with ScrollBars and the Record Navigation control"
End Sub

کجا بنویسم ؟ توی فرم لود ؟؟
بازم از راهنمایی های کاملتون ممنونم .
موفق باشین ..

powerboy2988
چهارشنبه 18 مرداد 1385, 22:08 عصر
behem pm bede rahatari injori sakhte be khoda

powerboy2988
چهارشنبه 18 مرداد 1385, 22:16 عصر
code ziro to form load benevis

Option Compare Database
Option Explicit

Private Declare Function LoadLibrary Lib "kernel32" _
Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long

Private Declare Function FreeLibrary Lib "kernel32" _
(ByVal hLibModule As Long) As Long

Private Declare Function StopMouseWheel Lib "MouseHook" _
(ByVal hWnd As Long, ByVal AccessThreadID As Long, _
Optional ByVal bNoSubformScroll As Boolean = False, Optional ByVal blIsGlobal As Boolean = False) As Boolean

Private Declare Function StartMouseWheel Lib "MouseHook" _
(ByVal hWnd As Long) As Boolean

Private Declare Function GetCurrentThreadId Lib "kernel32" () As Long

' Instance returned from LoadLibrary call
Private hLib As Long


Public Function MouseWheelOFF(Optional NoSubFormScroll As Boolean = False, Optional GlobalHook As Boolean = False) As Boolean
Dim s As String
Dim blRet As Boolean
Dim AccessThreadID As Long

On Error Resume Next
' Our error string
s = "Sorry...cannot find the MouseHook.dll file" & vbCrLf
s = s & "Please copy the MouseHook.dll file to your Windows System folder or into the same folder as this Access MDB."

' OK Try to load the DLL assuming it is in the Window System folder
hLib = LoadLibrary("MouseHook.dll")
If hLib = 0 Then
' See if the DLL is in the same folder as this MDB
' CurrentDB works with both A97 and A2K or higher
hLib = LoadLibrary(CurrentDBDir() & "MouseHook.dll")
If hLib = 0 Then
MsgBox s, vbOKOnly, "MISSING MOUSEHOOK.dll FILE"
MouseWheelOFF = False
Exit Function
End If
End If

' Get the ID for this thread
AccessThreadID = GetCurrentThreadId()
' Call our MouseHook function in the MouseHook dll.
' Please not the Optional GlobalHook BOOLEAN parameter
' Several developers asked for the MouseHook to be able to work with
' multiple instances of Access. In order to accomodate this request I
' have modified the function to allow the caller to
' specify a thread specific(this current instance of Access only) or
' a global(all applications) MouseWheel Hook.
' Only use the GlobalHook if you will be running multiple instances of Access!
MouseWheelOFF = StopMouseWheel(Application.hWndAccessApp, AccessThreadID, NoSubFormScroll, GlobalHook)

End Function


'******************** Code Begin ****************
'Code courtesy of
'Terry Kreft & Ken Getz
'
Function CurrentDBDir() As String
Dim strDBPath As String
Dim strDBFile As String
strDBPath = CurrentDb.Name
strDBFile = Dir(strDBPath)
CurrentDBDir = Left$(strDBPath, Len(strDBPath) - Len(strDBFile))
End Function
'******************** Code End ****************


Private Sub Detail_Click()

End Sub

' Copyright Lebans Holdings 1999 Ltd.
' www.lebans.com
' You are free to use the MouseHook.dll in any of your applications,
' whether personal or commercial providing you are not selling this DLL
' by itself or as part of a collection.

' You must copy the MouseHook.dll file into either your
' Windows System folder or into the same folder where this MDB resides.
' If you are distributing Front End/Back End MDBs then ensure that the
' MouseHook.dll file is copied to the same folder where the FRONT END MDB resides.
' The MouseHook.dll is NOT an ActiveX DLL that must be registered.
' Just copy the DLL to one of the folders as indicated above.


Private Sub Form_Load()
' Fill a TextBox so we can use the MouseWheel to scroll its contents.
Me.Text15.Value = "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf
Me.Text15.Value = Me.Text15.Value & "1" & vbCrLf & "2" & vbCrLf & "3" & vbCrLf

' Default to MouseWheel ON!
Me.txtStatus.Value = "The MouseWheel is turned ON"
End Sub

Private Sub Command14_Click()
' Turn the MouseWheel Off
Dim blRet As Boolean
' Call our MouseHook function in the MouseHook dll.
' Please not the Optional GlobalHook BOOLEAN parameter
' Several developers asked for the MouseHook to be able to work with
' multiple instances of Access. In order to accomodate this request I
' have modified the function to allow the caller to
' specify a thread specific(this current instance of Access only) or
' a global(all applications) MouseWheel Hook.
' Only use the GlobalHook if you will be running multiple instances of Access!
blRet = MouseWheelOFF(True, False)
Me.txtStatus.Value = "The MouseWheel is turned OFF except for ListBox controls, TextBox controls with ScrollBars and the Record Navigation control"
End Sub



Private Sub Command28_Click()
On Error GoTo Err_Command28_Click


' Screen.PreviousControl.SetFocus
' DoCmd.FindNext

Exit_Command28_Click:
Exit Sub

Err_Command28_Click:
MsgBox Err.Description
Resume Exit_Command28_Click

End Sub

rasti dar morede combot tozihe bishtar bede

fatimah
چهارشنبه 18 مرداد 1385, 23:00 عصر
وری وری تنکس