09. august 2001 - 10:20Der er
12 kommentarer og 1 løsning
Navigationsknapper??
Kan man selv designe og placerer sine navigationsknapper?
Jeg har en SØG-knap hvor jeg har en hændelsesprocedure som søger i en tabel efter hvad der indtastes i et textfelt (Søgefelt11). Nu kunne jeg godt tænke mig at få navigationsknapperne med på formularen.
her er hændelsen:
Private Sub Søg_Click() On Error GoTo Err_Søg_Click
Dim db As Database Dim tdf As TableDef Dim fld As Field Dim fld1 As Boolean Dim stDocName As String Dim stLinkCriteria As String
when you say \"navigationsknapper\" I understand you to mean Next, Previous, Last, first etc. is that correct? If so use the button wizrad and choose record navigation where you can choose which buutons to use, the code gets generated for you!
\'Building a string containg \'current record\' \'of \'num of records\' on a form.
Function hpFormRecCount(Form As Form) As String Dim lngRecPos As Long Dim lngRecCount As Long Dim strTemp As String
If Form.NewRecord And Form.RecordsetClone.BOF Then strTemp = \"1 of 1\" Exit Function
ElseIf Form.NewRecord And Not Form.RecordsetClone.BOF Then lngRecPos = Form.CurrentRecord lngRecCount = (Form.RecordsetClone.RecordCount + 1) Else Form.RecordsetClone.MoveLast lngRecPos = Form.CurrentRecord lngRecCount = Form.RecordsetClone.RecordCount End If
Just to let you know that it works when filtering too!
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.