G
Guest
My database stores City and State in two separate columns, but I want
to display them on my form as a single field. Since I'm a complete VB
novice, I'm not sure how to do this. I bind the data, and I can bring
each field into my forn as a separate textbox. I created a third
textbox, and added code in the Form_Paint routine to concatenate the
fields:
CityStateTextBox.Text = CityTextBox.Text + ", " + StateTextBox.Text
This displayed just great, and the values were correct as I moved from
record to record with the PropertyBindingNavigator. I thought I could
just set the CityTextBox and StateTextBox to Visible = False in the
Properties window and I'd be done, but this causes the value in my
CityStateTextBox to disappear as well.
I know there must be some way to access the data values themselves for
the current row, rather than pulling them from text boxes, but I'm not
knowledgeable enough to figure it out myself. Any suggestions?
to display them on my form as a single field. Since I'm a complete VB
novice, I'm not sure how to do this. I bind the data, and I can bring
each field into my forn as a separate textbox. I created a third
textbox, and added code in the Form_Paint routine to concatenate the
fields:
CityStateTextBox.Text = CityTextBox.Text + ", " + StateTextBox.Text
This displayed just great, and the values were correct as I moved from
record to record with the PropertyBindingNavigator. I thought I could
just set the CityTextBox and StateTextBox to Visible = False in the
Properties window and I'd be done, but this causes the value in my
CityStateTextBox to disappear as well.
I know there must be some way to access the data values themselves for
the current row, rather than pulling them from text boxes, but I'm not
knowledgeable enough to figure it out myself. Any suggestions?