The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
| |
|
Re: Problem launching a form from a menu
Posted: 17 Aug 06 9:49 AM
|
fiogf49gjkf0d I don't have a specfic answer for you but i've run into this error when running a form that is bound to a data table. For instance I have a button (works the same with menu items) that runs a calculator for the specific account. It runs fine at the account level (it's bound to an account table), but it throws this error at the contact level.
I was thinking about adding some script that would look at the level and move the user to the correct level if needed. Not sure if this is possible or if it'll work yet. I'm sure some of the other more experienced developers can chime in. |
|
|
|
Re: Problem launching a form from a menu
Posted: 17 Aug 06 9:51 AM
|
fiogf49gjkf0d I figured out the problem...
I was trying to use a Data Form when I should be using a Manage Form! Funny how these things are easily overlooked! |
|
|
|
Re: Problem launching a form from a menu
Posted: 18 Aug 06 9:30 AM
|
fiogf49gjkf0d If you did need to use a data form (for binding context) then you could launch that using ShowViewForRecord without getting the error you mentioned (it was complinaing about not having it's "subject" or context for binding. Using ShowViewForRecord allows you to give it context by passing an ID & table for an edit, or a blank ID for an add)
-Ryan |
|
|
|
Re: Problem launching a form from a menu
Posted: 26 Aug 06 8:38 AM
|
fiogf49gjkf0d I have this same problem, but on a data form with a grid (thus, it should dislpay all the records from the table) How do I add context to a list view?
Also, I tried using a manage form instead, but then it just doesn't show the data in the table when the form launches.
Ina |
|
|
| |
|
Re: Problem launching a form from a menu
Posted: 26 Aug 06 10:38 AM
|
fiogf49gjkf0d Originally posted by Ina Nortje
I have this same problem, but on a data form with a grid (thus, it should dislpay all the records from the table) How do I add context to a list view?
|
|
Did you set the BindID of the Grid?
How is the form that contains the grid launched from the user interface --from a tab, or menu, or ToolBar Icon?
|
|
|
|
Re: Problem launching a form from a menu
Posted: 26 Aug 06 11:38 AM
|
fiogf49gjkf0d Hi there!
Thanks for the reply
The BindID on the data form is set to the unique identifier of the new table, and the form is launced from the menu. It seems like I have to set the context through the code somehow, but I cannot do it using ShowViewForRecord(TableName As String, FormName As String, RecordID As String) As ModalResult because this is not a detail form. I need the syntax to use to set the context of a grid. |
|
|
|
Re: Problem launching a form from a menu
Posted: 26 Aug 06 12:06 PM
|
fiogf49gjkf0d OK, I am one step further
When I use a manage form, I do not get the error. However, the grid does not refresh automatically when the form loads. I added the following code:
Sub grdDriversClick(Sender)
grdDrivers.Refresh
End Sub
However, I need the grid to refresh automatically on load. Is there any documentation on which events fire under which circumstances? I need to put this code on the first event that fires when this grid is loaded.
Thanks
Ina |
|
|
| |
|
Re: Problem launching a form from a menu
Posted: 26 Aug 06 9:41 PM
|
fiogf49gjkf0d Originally posted by Ina Nortje
When I use a manage form, I do not get the error. However, the grid does not refresh automatically when the form loads. I added the following code:
Sub grdDriversClick(Sender)
grdDrivers.Refresh
End Sub
However, I need the grid to refresh automatically on load. Is there any documentation on which events fire under which circumstances? I need to put this code on the first event that fires when this grid is loaded. |
|
Put the grdDrivers.Refresh call in the WhenOpen event of your managed form. |
|
|
|
Re: Problem launching a form from a menu
Posted: 01 Sep 06 11:58 PM
|
fiogf49gjkf0d I have begun putting my grid.refresh statements in both OnOpen and OnCreate events, because my forms get opened in different ways sometimes and one or the other wouldn't work. |
|
|
|