Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Tuned Listener
Posts: 67
Registered: ‎11-29-2011
Accepted Solution

Contact Form doesn't show data



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("SystemSmiley Tonguelayer Profile", 0, True)
    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

Silver Super Contributor
Posts: 801
Registered: ‎03-24-2009

Re: Contact Form doesn't show data

Consider not using a main view (unless you need it for a reason). Use


x = Application.BasicFunctions.ShowViewForRecord ("CONTACT","SystemSmiley Tonguelayer 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).



Tuned Listener
Posts: 67
Registered: ‎11-29-2011

Re: Contact Form doesn't show data

Thanks a lot. That's helpful.