powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Как заставить работать этот компонент?
11 сообщений из 11, страница 1 из 1
Как заставить работать этот компонент?
    #32495913
Фотография Gyslik.
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Есть каледнарь (написан Сергеем Гавриловым под Access97).
Есть контекстный поиск Лободавы, который ищет в диапазоне дат. Реализован ввиде компонента. Так вот он работает если в поля дат набирать вручную с клавы, а если вставлять значения в поля с помощью календаря, то ничего не работает. Вот код реализующий контектсный поиск в диапазоне дат:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
Option Compare Database
Option Explicit

Private WithEvents mtboFirstDate As TextBox


Private WithEvents mtboSecondDate As TextBox


Private mflbParent As clsFilteredListBox

Public FilteredField As String
Public TimeDataType As Boolean

Public Property Get FirstDateControl() As TextBox
    Set FirstDateControl = mtboFirstDate
End Property
Public Property Set FirstDateControl(tboNewValue As TextBox)
    Set mtboFirstDate = tboNewValue
    mtboFirstDate.AfterUpdate =  "[Event Procedure]" 
    mtboFirstDate.OnKeyPress =  "[Event Procedure]" 
    mtboFirstDate.OnChange =  "[Event Procedure]" 
End Property

Public Property Get SecondDateControl() As TextBox
    Set SecondDateControl = mtboSecondDate
End Property
Public Property Set SecondDateControl(tboNewValue As TextBox)
    Set mtboSecondDate = tboNewValue
    mtboSecondDate.AfterUpdate =  "[Event Procedure]" 
    mtboSecondDate.OnKeyPress =  "[Event Procedure]" 
    mtboSecondDate.OnChange =  "[Event Procedure]" 
End Property

Private Sub mtboFirstDate_AfterUpdate()
    mtboFirstDate.SpecialEffect =  2 
    mflbParent.Requery
End Sub

Private Sub mtboFirstDate_Change()
    mtboFirstDate.SpecialEffect =  3 
End Sub

Private Sub mtboFirstDate_KeyPress(KeyAscii As Integer)
    If TimeDataType Then
        SetTime mtboFirstDate, KeyAscii
    Else
        SetDate mtboFirstDate, KeyAscii
    End If
    
    If KeyAscii =  0  Then mtboFirstDate_AfterUpdate
End Sub

Private Sub mtboSecondDate_AfterUpdate()
    mtboSecondDate.SpecialEffect =  2 
    mflbParent.Requery
End Sub

Private Sub mtboSecondDate_Change()
mtboSecondDate.SpecialEffect =  3 
End Sub

Private Sub mtboSecondDate_KeyPress(KeyAscii As Integer)
    If TimeDataType Then
        SetTime mtboSecondDate, KeyAscii
    Else
        SetDate mtboSecondDate, KeyAscii
    End If
    
    If KeyAscii =  0  Then mtboSecondDate_AfterUpdate
End Sub

Public Property Get ParentFilteredListBox() As clsFilteredListBox
    Set ParentFilteredListBox = mflbParent
End Property
Public Property Set ParentFilteredListBox(clsNewFiltredList As clsFilteredListBox)
    Set mflbParent = clsNewFiltredList
End Property

Public Function Criteria() As String
    If Not mtboFirstDate Is Nothing Then
        If mtboSecondDate Is Nothing Then
            If Not IsNull(mtboFirstDate) Then
                Criteria =  "And ("  & Me.FilteredField &  " = #"  & Format(mtboFirstDate,  "mm\/dd\/yyyy" ) &  "#) " 
            Else
                Criteria = vbNullString
            End If
        Else
            If Not IsNull(mtboFirstDate) And Not IsNull(mtboSecondDate) Then
                Criteria =  "And ("  & Me.FilteredField &  " Between #"  & Format(mtboFirstDate,  "mm\/dd\/yyyy" ) _
                &  "# And #"  & Format(mtboSecondDate,  "mm\/dd\/yyyy" ) &  "#) " 
            ElseIf Not IsNull(mtboFirstDate) And IsNull(mtboSecondDate) Then
                Criteria =  "And ("  & Me.FilteredField &  " >= #"  & Format(mtboFirstDate,  "mm\/dd\/yyyy" ) &  "#) " 
            ElseIf IsNull(mtboFirstDate) And Not IsNull(mtboSecondDate) Then
                Criteria =  "And ("  & Me.FilteredField &  " <= #"  & Format(mtboSecondDate,  "mm\/dd\/yyyy" ) &  "#) " 
            Else
                Criteria = vbNullString
            End If
        End If
    Else
        Criteria = vbNullString
    End If
End Function
Public Sub Reset()
    mtboFirstDate.Value = Null
    If Not mtboSecondDate Is Nothing Then mtboSecondDate.Value = Null
End Sub

Может быть надо копать в календаре, чтобы он читал не только клавиатурный ввод?
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495920
lobodava
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Я думаю что календарь копать не надо :))

Покажите, пожалуйста, код, с помощью которого открывается календарь.
Желательно начиная с объявления Private Sub ...
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495923
Фотография Gyslik.
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Вот по этому вызывается календарь, который описан в отдельной форме.
Я думаю, что каледнарь возвращает выбраное юзером значение в элемент управления, который был в фокусе в момент открытия формы Каледарь, а как там чего работает мне не понять

Private Sub call_datepicker_Click()
Me.tboOrderDateFromFilter.SetFocus
DoCmd.OpenForm "пфр_календарь"
End Sub

Вот отдельная форма календаря:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.
302.
303.
304.
305.
306.
307.
308.
309.
310.
311.
312.
313.
314.
315.
316.
317.
318.
319.
320.
321.
322.
323.
324.
325.
326.
327.
328.
329.
330.
331.
332.
333.
334.
335.
336.
337.
338.
339.
340.
341.
342.
343.
344.
345.
346.
347.
348.
349.
350.
351.
352.
353.
354.
355.
356.
357.
358.
359.
360.
361.
362.
363.
364.
365.
366.
367.
368.
369.
370.
371.
372.
373.
374.
375.
376.
377.
378.
379.
380.
381.
382.
383.
384.
385.
386.
387.
388.
389.
390.
391.
392.
393.
394.
395.
396.
397.
398.
399.
400.
401.
402.
403.
404.
405.
406.
407.
408.
409.
410.
411.
412.
413.
414.
415.
416.
417.
Option Explicit

Dim mCallingControl As Control
Dim mCallingForm As Form
Dim mCurrentControl As Control
Dim mPreviousControl As Control
Dim mUndoDate As Date
Dim mAffectedDate As Date

Private Function CloseForm()
        On Error Resume Next
        If IsDate(mAffectedDate) Then
            mCallingControl.Value = mAffectedDate
        Else

        End If
    DoCmd.Close acForm, Me.Name
End Function

Private Sub Form_Draw()
    Dim sCtl As Control
    Dim sDtmDate As Date
    Dim sDtmStartDate As Date
    Dim sIntCounter As Integer
    Dim sIntMonth As Integer

    With Me
        .MarkUp.Visible = False
        .cap.Caption = Format(mDtmDate,  "mmmm yyyy" )
        .Painting = False
    End With
    
    sIntMonth = Month(mDtmDate)
    sDtmStartDate = DateSerial(Year(mDtmDate), Month(mDtmDate),  1 )
    sDtmStartDate = sDtmStartDate - WeekDay(sDtmStartDate, vbUseSystem) +  1 
    
    For sIntCounter =  1  To  7 
        Set sCtl = Me.Controls( "Label"  & sIntCounter)
        sCtl.Caption = Format(sIntCounter +  1 ,  "ddd" )
    Next sIntCounter
    
    For sIntCounter =  8  To  49 
        sDtmDate = sDtmStartDate + sIntCounter -  8 
        Set sCtl = Me.Controls( "Label"  & sIntCounter)
        With sCtl
            .Caption = Format(sDtmDate,  "d" )
            .Tag = sDtmDate
        
            Select Case sDtmDate
                Case VBA.Date
                    .ForeColor = vbRed
                    .BackColor = vbYellow
                Case Else
                    If Month(sDtmDate) = sIntMonth Then
                        .ForeColor = vbBlack
                        .BackColor = vbYellow
                    Else
                        .ForeColor = vbGrayText
                        .BackColor = vbWhite
                    End If
            End Select
    
            If sDtmDate = mDtmDate Then
                Set mCurrentControl = sCtl
                Me.MarkUp.Visible = True
                Me!MarkUp.Left = .Left
                Me!MarkUp.Top = .Top
            End If
            .FontBold = (sDtmDate = Date)
        End With
    
    Next sIntCounter
    Me.Painting = True
End Sub

Private Sub btnMonth_Click()
    DoCmd.OpenForm  "frmMonth" 
End Sub

Private Sub btnMonthMinus_Click()
    ChangeMonth  "m" , - 1 
End Sub

Private Sub btnMonthMinus_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.btnMonthMinus.SpecialEffect =  2 
End Sub

Private Sub btnMonthMinus_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.btnMonthMinus.SpecialEffect =  1 
End Sub

Private Sub btnMonthPlus_Click()
    ChangeMonth  "m" ,  1 
End Sub

Private Sub btnMonthPlus_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.btnMonthPlus.SpecialEffect =  2 
End Sub

Private Sub btnMonthPlus_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.btnMonthPlus.SpecialEffect =  1 
End Sub

Private Sub btnYearMinus_Click()
    ChangeMonth  "yyyy" , - 1 
End Sub

Private Sub btnYearMinus_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.btnYearMinus.SpecialEffect =  2 
End Sub

Private Sub btnYearMinus_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.btnYearMinus.SpecialEffect =  1 
End Sub

Private Sub btnYearPlus_Click()
    ChangeMonth  "yyyy" ,  1 
End Sub

Private Sub btnYearPlus_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.btnYearPlus.SpecialEffect =  2 
End Sub
Private Sub btnYearPlus_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.btnYearPlus.SpecialEffect =  1 
End Sub

Private Sub capToday_Click()
    mDtmDate = VBA.Date
    Form_Draw
    mCallingControl.Value = mDtmDate
End Sub

Private Sub Form_Close()
    Set mCallingControl = Nothing
    Set mCallingForm = Nothing
    Set mCurrentControl = Nothing
    Set mPreviousControl = Nothing
End Sub



Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case vbKeyLeft
        ChangeDay  "d" , - 1 
    Case vbKeyRight
        ChangeDay  "d" ,  1 
    Case vbKeyUp
        ChangeDay  "d" , - 7 
    Case vbKeyDown
        ChangeDay  "d" ,  7 
    Case Else
        DoCmd.Close acForm, Me.Name
        KeyCode =  0 
    End Select
End Sub

Private Sub Form_Load()
    Dim z As Long
    
    Me.capToday.Caption =  "Сегодня: "  & Format(Date,  "dd.mm.yyyy" )
    For z =  1  To  7 
        Me.Controls( "Label"  & CStr(z)).Caption = Left(Format(z,  "ddd" ),  2 )
    Next z
    
    With DoCmd
        .Restore
        .RunCommand acCmdSizeToFitForm
    End With
    
    On Error GoTo NoDateAvailable
    mDtmDate = mCallingControl.Value

ExitLoad:
    mUndoDate = mDtmDate
    Form_Draw
    Exit Sub

NoDateAvailable:
    mDtmDate = VBA.Date
    On Error GoTo  0 
    Resume ExitLoad
End Sub

Private Sub Form_Open(Cancel As Integer)
    
    On Error Resume Next
    With Application.Screen
        Set mCallingControl = .ActiveControl
        Set mCallingForm = .ActiveForm
    End With
    If Not mCallingControl Is Nothing Then
        FormPlacement mCallingControl
    End If

    On Error GoTo  0 
End Sub

Private Sub FormPlacement(ByRef ctl As Control)
    Dim ctlRect As Rect
    Dim frmDimensions As Dimensions
    Dim frmRect As Rect
    Dim scrDimensions As Dimensions
    
    ctlRect = ControlRect(ctl)
    frmDimensions = FormDimensions(Me)
    scrDimensions.Width = GetSystemMetrics(SM_CXSCREEN)
    scrDimensions.Height = GetSystemMetrics(SM_CYSCREEN)
    If (scrDimensions.Width - ctlRect.Right) > ctlRect.Left Then
        frmRect.Left = ctlRect.Left
    Else
        frmRect.Left = ctlRect.Right - frmDimensions.Width +  2 
    End If
    If (scrDimensions.Height - ctlRect.Bottom) > ctlRect.Top Then
        frmRect.Top = ctlRect.Bottom +  2 
    Else
        frmRect.Top = ctlRect.Top - frmDimensions.Height
    End If
    SetWindowPos Me.hWnd,  0 , frmRect.Left, frmRect.Top, _
            frmDimensions.Width, frmDimensions.Height, SWP_NOZORDER
    Me.Visible = True
End Sub

Private Sub HiLite(ByRef AffectedControl As Control)
        On Error Resume Next
        If IsDate(AffectedControl.Tag) Then
            mAffectedDate = AffectedControl.Tag
            Set mPreviousControl = AffectedControl
        Else
            mAffectedDate = Null
        End If
End Sub

Private Sub Label8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label8
End Sub

Private Sub Label9_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label9
End Sub

Private Sub Label10_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label10
End Sub

Private Sub Label11_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label11
End Sub

Private Sub Label12_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label12
End Sub

Private Sub Label13_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label13
End Sub

Private Sub Label14_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label14
End Sub

Private Sub Label15_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label15
End Sub

Private Sub Label16_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label16
End Sub

Private Sub Label17_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label17
End Sub

Private Sub Label18_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label18
End Sub

Private Sub Label19_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label19
End Sub

Private Sub Label20_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label20
End Sub

Private Sub Label21_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label21
End Sub

Private Sub Label22_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label22
End Sub

Private Sub Label23_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label23
End Sub

Private Sub Label24_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label24
End Sub

Private Sub Label25_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label25
End Sub

Private Sub Label26_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label26
End Sub

Private Sub Label27_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label27
End Sub

Private Sub Label28_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label28
End Sub

Private Sub Label29_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label29
End Sub

Private Sub Label30_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label30
End Sub

Private Sub Label31_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label31
End Sub

Private Sub Label32_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label32
End Sub

Private Sub Label33_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label33
End Sub

Private Sub Label34_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label34
End Sub

Private Sub Label35_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label35
End Sub

Private Sub Label36_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label36
End Sub

Private Sub Label37_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label37
End Sub

Private Sub Label38_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label38
End Sub

Private Sub Label39_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label39
End Sub

Private Sub Label40_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label40
End Sub

Private Sub Label41_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label41
End Sub

Private Sub Label42_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label42
End Sub

Private Sub Label43_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label43
End Sub

Private Sub Label44_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label44
End Sub

Private Sub Label45_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label45
End Sub

Private Sub Label46_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label46
End Sub

Private Sub Label47_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label47
End Sub

Private Sub Label48_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label48
End Sub

Private Sub Label49_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    HiLite Me.Label49
End Sub

Public Function ChangeMonth(ByVal Interval As String, ByVal Direction As Long)
    On Error Resume Next
    mDtmDate = DateAdd(Interval, Direction, mDtmDate)
    Form_Draw
    mCallingControl.Value = mDtmDate
End Function
Public Function ChangeDay(ByVal Interval As String, ByVal Direction As Long)
    On Error Resume Next
    mDtmDate = DateAdd(Interval, Direction, mDtmDate)
    Form_Draw
    mCallingControl.Value = mDtmDate
End Function

Function SelLabel()
    mPreviousControl.FontBold = True
End Function
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495927
Фотография Владимир Саныч
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Модератор форума
Призываю господ студентов форматировать программный код самостоятельно. :^)
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495928
Фотография Geo
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
2 Gyslik.

Нда... Интересно, кто-нибудь будет читать и разбираться в таком количестве текста?

Ты ленивый? Я тоже. Думаю, что и многие другие. М.б. прежде стоит как-то локализовать проблему?
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495930
Фотография Gyslik.
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
2 Geo:
Вы правы - в будующем учту.
2 ВС:
А как форматировать программный код - я не знаю ? ? ?
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495932
Фотография Владимир Саныч
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Модератор форума
Выделяешь мышкой и жмешь на SRC.
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495933
Фотография Gyslik.
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
А по поводу сабжа есть предположения?
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495934
Фотография Владимир Саныч
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Модератор форума
:^) Кабы были, я бы сказал.
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495935
lobodava
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Я так полагаю, что этот кусок кода
Код: plaintext
1.
2.
3.
Private Sub call_datepicker_Click() 
Me.tboOrderDateFromFilter.SetFocus 
DoCmd.OpenForm  "пфр_календарь"  
End Sub  

лежит там же, где объявляется новый класс:
Код: plaintext
Private flb As New clsFilteredListBox


Можно было бы попробовать вот так:
Код: plaintext
1.
2.
3.
4.
Private Sub call_datepicker_Click() 
Me.tboOrderDateFromFilter.SetFocus 
DoCmd.OpenForm  "пфр_календарь" ,,,,,acDialog
flb.Requery
End Sub  


Это то, что сразу хочется попробовать. Если работать не будет, то надо копать глубже
...
Рейтинг: 0 / 0
Как заставить работать этот компонент?
    #32495961
Фотография Gyslik.
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Ok. Сделал:
Private Sub tboOrderDateFromFilter_LostFocus()
flbOrders.Requery
End Sub

Помогло.

2 lobodava:
Огромное спасибо ! ! !
...
Рейтинг: 0 / 0
11 сообщений из 11, страница 1 из 1
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Как заставить работать этот компонент?
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]