|
|
|
Что такое DAO
|
|||
|---|---|---|---|
|
#18+
Знающие люди!!! Помогите!!! Не понимаю. Беру книгу Гейтса на компакте смотрю пример - все работает Переношу в свою базу - дает ошибку. Не нравится ему DAO.Recordset Public Function acbDoSearchDynaset(ctlText As Control, _ ctlList As Control, strBoundField As String) As Variant ' Search through a bound listbox, given text to find from a text box. ' Move the list box to the appropriate row. ' The listbox can have either a table or a dynaset ' (a query or an SQL statement) as its row source. ' In: ' ctlText: a reference to the text box you're typing into ' ctlList: a reference to the list box you're looking up in ' strBoundField: the name of the field in the underlying ' table in which you're looking for values. ' Out: ' Return value: either 0 (no error) or an error variant ' containing the error number. Dim rst As DAO.Recordset Dim varRetval As Variant Dim db As DAO.Database On Error GoTo HandleErr Set db = CurrentDb() Set rst = db.OpenRecordset(ctlList.RowSource, dbOpenDynaset) ' Use the .Text property, because you've not yet left the ' control. Its value (or its .Value property) aren't ' set until you leave the control. rst.FindFirst "[" & strBoundField & "] >= " & acbcQuote & ctlText.Text & acbcQuote If Not rst.NoMatch Then ctlList = rst(strBoundField) End If varRetval = acbcErrNoError ExitHere: acbDoSearchDynaset = varRetval On Error Resume Next rst.Close Set rst = Nothing Exit Function HandleErr: varRetval = CVErr(Err) Resume ExitHere End Function ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.11.2003, 01:39 |
|
||
|
Что такое DAO
|
|||
|---|---|---|---|
|
#18+
У тебя явно акцесс не 97-й :) В редакторе кода вызови меню Tools-References, в открывшемся окне найди строку Microsoft DAO ..., и поставь там флажок. И все будет хорошо. -- Не "Гейтс", млин, а Гетц. Это наш кумир, не побоюсь этого слова. :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.11.2003, 01:48 |
|
||
|
|

start [/forum/topic.php?fid=45&msg=32329500&tid=1678141]: |
0ms |
get settings: |
9ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
50ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
44ms |
get tp. blocked users: |
1ms |
| others: | 226ms |
| total: | 360ms |

| 0 / 0 |
