Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting present date to all rows of a grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00563357
Message ID:
00563361
Views:
14
Hi Max,

in the init you could say:
Update (ThisForm.Grid1.RecordSource) set MyField = date() where empty(myfield)
You may need to reset the record pointer wit a GO TOP or a LOCATE afterwards.

Cheers,

Andrew

>You guys are great! Thanks for all your help! I have another question if you don't mind. The grid that I use has a recordsource to automatically insert data from a specific table that I have. I have one field that is empty in the table but during runtime I would like the field to insert the present date.
>I have tried the following code on the forms "Init" but it only inserts into the first row and all the other records remain empty from that field.
>ThisForm.Grid1.Column20.text1.value = DATE()
>Thanks for your help!
>
>Max


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform