Wrong ADO Date Textbox Format

G

Guest

An incorrect date and time format appears in the Textbox when I _Leave(..)
the date TB and focus on another TB for the same Datagrid index (1/8/05
12:00:00 AM vice 1/8/05).

I have an MS-Access DS bound to a DG and TB’s. The TB’s reveal the contents
of each column of the DG at the specified DG index (one of which is date).

_LoadWinForm(..) {
formatDateTextbox(); //works ok
}

_LeaveDateTextbox(..) {
DSsave();
formatDateTextbox(); //doesn’t work
}

_ValidatingDateTextbox (..) and
_OnListChanged(..)
formatDateTextbox(); //doesn’t work
}

//fires when DG index changes
_CurrentCellChanged(..) {
formatDateTextbox(); // works ok
}

formatDateTextbox() {
DateTime dt = Convert.ToDateTime(DS.Tables[0].Rows[row][col]);
dateTB.Text = dt.ToString("MM/dd/yyyy");
}
 
G

Guest

If I try adding a textbox_BindingContextChange(..) event I get an System Out
of Memory exception, "Error Creating Window Handle"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top