command button don't work anymore?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have a problem, I'm moving a database from server client "Metaframe
win2000" to server client "Metaframe winxp" but suddendly a button doesn't
work anymore...

I tried to copy the code into the new database but this doesn't work aswell...

Does anybody has any idea?
please find my code below..

*********************************************************
Private Sub Command60_Click()
Dim dag As String
Dim maand As String
dag = Day(Date)
If Len(dag) = 1 Then dag = 0 & dag

maand = Month(Date)
If Len(maand) = 1 Then maand = 0 & maand

[Sales order date].Value = dag & "-" & maand & "-" & Right(Year(Date), 2)
End Sub
 
Arjan,

First, why do you want to store this data as a text value rather than as a
date? If you ever want to use it for anything, you will have to convert it
back to a date data type.

Assuming that you really want to do this, why do you need a command button
for this? Why not just set the controls default value to:

=format(Date(), "dd-mm-yy")

HTH
Dale
 
Hi all,

I have a problem, I'm moving a database from server client "Metaframe
win2000" to server client "Metaframe winxp" but suddendly a button doesn't
work anymore...

I tried to copy the code into the new database but this doesn't work aswell...

Does anybody has any idea?
please find my code below..

*********************************************************
Private Sub Command60_Click()
Dim dag As String
Dim maand As String
dag = Day(Date)
If Len(dag) = 1 Then dag = 0 & dag

maand = Month(Date)
If Len(maand) = 1 Then maand = 0 & maand

[Sales order date].Value = dag & "-" & maand & "-" & Right(Year(Date), 2)
End Sub

If the only change is copying a database (.mdb) file from one computer
to another, then there must be a link to some outside database or
table that is no longer valid.
 
Back
Top