When I open the Form, The Latest Table Value set into Field in Form Controls.
How to clear all fields in a form OR set clear or empty value to form controls…?
I assume that your controls are bound to a data source, therefore we should talk about the active record of the data source and not form controls.
I can interpret your requirement in two different ways:
- You don’t want any record loaded in your data source.
- You want a new, empty record to be automatically created
Please explain what you need.
My requirement is When I open the Form, all the Fields should be empty(I thing it get record form Datasource)…
And then When I click Look up(Using SysTableLookup) Corresponding records will be displayed( I have written code for After select the data from Look up.
You probably want to create a new record, but I’m not going to guess what you want and what the problem is.
No need to create a new record. Just Show the Data in Grid Controls(AllowEdit=False). Grid Controls are append by Data source and Data field(Using Drag-Drop from Data Source).
So My My requirement is When I open the Form, all the Grid Controls should be empty…
So which record will you show in the grid? None? Because loading an existing record without showing values of its fields wouldn’t make sense at all.
Why are you trying to create a read-only field showing empty fields?
Hi Martin, Please check the following… Before Select the Lookup, some records are display in Form Controls. I need to clear those field before select the Lookup…
I thing Now u got my requirement …
Does it mean that you want to modify an existing record and change values of some fields? If so, what’s the problem? Nevertheless are you really sure that you don’t want to create a new record?
I no need to modify or Create a Record… Just I display the records after select the data from Above 2 Lookup(Select Apartment & Select Room…)
Please see the above picture… Before Select the above Lookups, some records are display in Form Controls
Just i want to empty all 8 fields.
You still didn’t get that you’re looking at an existing record loaded to the data source and shown by the controls bound to the data source.
You seem to live with the idea that your controls are not bound to any record and they just magically gets some values that you need to remove. That’s clearly not the case.
Seriously, go to MSDN and learn some basics. You’re just wasting your time if you try random things without understanding how the system works.