Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have impletemented input field in one of my tables. I can edit the field and able to save the values when i'm in developer view.
But, when i tried to open the file in server there is no value showing and even if i edit the field, the values are gone when I close the application.
Please help.
Regards,
Skip
use Dynamic update Command...refer in API Guide
Thanks.
Hope someone here can offer simpler and straight procedure on how to do it.
~skip~
Here are two macros:
sub export
set temp = ActiveDocument.GetApplication.GetProperties
set table = ActiveDocument.GetSheetObject("CH02")
table.Export "C:\temp\"&"Data"&"_"&replace(temp.Username,"\","")&"_"&right(date,4)&mid(date,4,2)&left(date,2)&left(Time,2)&mid(Time,4,2)&mid(Time,7,2)&".txt" , ";"
msgbox "Export succed"
end sub
sub resetinput
dim x(1)
x(0) = "TB02"
set fld = ActiveDocument.Fields("WertInput")
fld.ResetInputFieldValues 0, 0
end sub
sub export export all datas from chart02 into a file with Username and Timestamp
When Using a server folder you can read them from all users created by accesspoint
the second macro resets all values in the input tablebox (use only if needed).
Regards
Rem Dynamic Data Update
sub Update
SET Result = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Discount = if(Discount >= 35, 0, if (City='Stockholm', Discount + 5, Discount + 2)) WHERE Country = 'SE'")
if Result = false then
MsgBox Result.ErrorMessage
end if
end sub
sub Insert
SET Result = ActiveDocument.DynamicUpdateCommand ("INSERT INTO * (Country, City) VALUES (DK, Copenhagen), (NO, Oslo)")
if Result = false then
MsgBox Result.ErrorMessage
end if
end sub
sub Delete
SET Result = ActiveDocument.DynamicUpdateCommand ("DELETE FROM CITY WHERE IsNull (Discount)")
if Result = false then
MsgBox Result.ErrorMessage
end if
end sub
NOTE: Dont use Table name when you update and insert command.. our Datamodeling is same name means it makes relation so it update all tables