11-29-2011 06:36 PM
Hi,
I created a Contact Form with some TextFields and Labels link to a field through Data Path selections in the Contact Table.
Then I popup the form by click a button using
Dim objMainView
Set objMainView = Application.MainViews.Add("Systemlayer Profile", 0, True)
Application.MainViews.Add(
objMainView.BorderStyle = 3
If objMainView.ShowModal = mrOK Then
' Do something here - this is the OK button being pressed
End If
However, the data doesn't come in the form, all fields are empty.
Just want to ask what I need to do to populate the data on the form? Do I need to set anything?
Any help will be appreciated
Solved! Go to Solution.
11-29-2011 11:56 PM
Consider not using a main view (unless you need it for a reason). Use
x = Application.BasicFunctions.ShowViewForRecord ("CONTACT","Systemlayer Profile",cid)
Where cid - is the ContactID to display this record for and x is the return value (OK(1), Cancel(0)) (or they might be reversed)
This is a much quicker way of doing this if you just want to display data into a databound form. There are valid reasons for using a MV (such as invoking a script on the MV or setting values etc).
11-30-2011 06:51 PM
Thanks a lot. That's helpful.