|
|
|
Проблема с кодом.
|
|||
|---|---|---|---|
|
#18+
Помогите! Private Sub Кнопка3_Click() Dim strSQL As String, strSQLWhere As String strSQL = "SELECT potr, Naimen_potr, n_kontr, n_reg, d_reg, d_end FROM Pr_dop" strSQLWhere = " WHERE (" If Me![vk_potr] And Me![pol_potr] <> "" Then strSQLWhere = strSQLWhere & "([Pr_dop]![potr] =" & Me![pol_potr] & ") AND " End If If Me![vk_period] And Me![pol_period] <> "" Then strSQLWhere = strSQLWhere & "([Pr_dop]![d_end] =" & Format(Me![pol_period], "\#DD\/MM\/YY\#") & ") AND " End If If Len(strSQLWhere) > 8 Then 'Удаление попутно замыкающего " AND " strSQL = strSQL & Left(strSQLWhere, (Len(strSQLWhere) - 5)) & ");" Else strSQL = strSQL & ";" End If Me![f_dop1].Form.RecordSource = strSQL Me![f_dop1].Form.Requery End Sub В пректе MDB работает нормально, в ADP выдает ошибку (Недопустимая инструкция SQL. Проверте фильтр для сервера в источнике записей формы) и ссылается на Me![f_dop1].Form.RecordSource = strSQL Как быть? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 09.03.2004, 13:35 |
|
||
|
Проблема с кодом.
|
|||
|---|---|---|---|
|
#18+
скорее всего дело в дате кавычки одинарные исп ='" & Format(Me![pol_period], "YYYYMMDD") & "') AND да и ваще засунь условие в хп и радуйся результату ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 09.03.2004, 13:41 |
|
||
|
|

start [/forum/topic.php?fid=45&msg=32434630&tid=1676215]: |
0ms |
get settings: |
7ms |
get forum list: |
9ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
137ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
45ms |
get tp. blocked users: |
1ms |
| others: | 208ms |
| total: | 421ms |

| 0 / 0 |
