Sep 10th, 2000, 02:00 AM
I have access 2000 and im developing an aplication and i have to use access97 to access the database otherwise if i use ADODC i cant display the picture in the database. Also im trying to use a field in the database to calculate how many years and moths are between the date in my database and the current date, but its not working. And how can i save pictures in my access database from my app.
This is the code to the proyect:
Thaks
Option Explicit
Public txt_busqueda As String
Dim Busqueda As String
Dim FF As Date
Private Sub Command1_Click()
On Error GoTo AddErr
With Data1.Recordset
.AddNew
If .EOF Then .MoveLast
End With
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Private Sub Command2_Click()
On Error GoTo DeleteErr
With Data1.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Command4_Click()
Mantenimiento.WindowState = 1
End Sub
Private Sub Command44_Click()
Busqueda1.Show
Mantenimiento.Hide
End Sub
Private Sub Command5_Click()
On Error GoTo UpdateErr
Data1.Recordset.Update
Exit Sub
UpdateErr:
MsgBox Err.Description, , "Maestro de Pacientes"
End Sub
Private Sub Command6_Click()
Data1.Recordset.Edit
Data1.Recordset.Update
Mantenimiento.Refresh
End Sub
Private Sub Desig_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
End Sub
Private Sub Form_Load()
FF = Int(DateDiff("y", CDate("Data1.Recordset.fields(3)"), Date) / 365.25)
Text8.Text = FF
End Sub
Private Sub Nombre_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
End Sub
Private Sub Cia_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
End Sub
This is the code to the proyect:
Thaks
Option Explicit
Public txt_busqueda As String
Dim Busqueda As String
Dim FF As Date
Private Sub Command1_Click()
On Error GoTo AddErr
With Data1.Recordset
.AddNew
If .EOF Then .MoveLast
End With
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Private Sub Command2_Click()
On Error GoTo DeleteErr
With Data1.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Command4_Click()
Mantenimiento.WindowState = 1
End Sub
Private Sub Command44_Click()
Busqueda1.Show
Mantenimiento.Hide
End Sub
Private Sub Command5_Click()
On Error GoTo UpdateErr
Data1.Recordset.Update
Exit Sub
UpdateErr:
MsgBox Err.Description, , "Maestro de Pacientes"
End Sub
Private Sub Command6_Click()
Data1.Recordset.Edit
Data1.Recordset.Update
Mantenimiento.Refresh
End Sub
Private Sub Desig_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
End Sub
Private Sub Form_Load()
FF = Int(DateDiff("y", CDate("Data1.Recordset.fields(3)"), Date) / 365.25)
Text8.Text = FF
End Sub
Private Sub Nombre_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
End Sub
Private Sub Cia_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
End Sub