Integrated Application Platform › Forums › General › AccessGoto help
- This topic has 2 replies, 2 voices, and was last updated 7 years, 6 months ago by
johan@suneido.
-
AuthorPosts
-
November 23, 2015 at 4:07 am #1227
johan@suneido
ParticipantI have Browse showing rows of records (table ship_rel). User must click on button to open Access control showing selected record from Browse in an Access control, to show user more fields of record (do not want use ExplorerListView) – like:
` On_Access()
{
if false is .browse.Save() //
return
sel = .browse.GetSelection()
num_rows = .browse.GetNumRows()
if sel.Size() isnt 1
{
Alert(‘Please select one record’,
title: ‘Access Release’,
hwnd: .Window.Hwnd, flags: MB.ICONWARNING)
return false
}
//row = .browse.GetNumRows() is 1 ? 0 : sel[0]
//value = .browse.GetRow(row).shiprel_num_new //ALSO WORKING
value = .browse.GetAllBrowseData()[sel[0]].shiprel_num_new
AccessGoTo(‘Access_shiprel’, ‘shiprel_num_new’, value, .Window.Hwnd)
.Load_list()}
‘Access_shiprel window opens, but not on correct record (with value of shiprel_num_new).
Table schema:
shiprel
(shipcontact_num, shipcust_num, shipprod_num,
shiprel_TS, shiprel_accountno, shiprel_contractno,
shiprel_date, shiprel_deliveryno,
shiprel_driverid, shiprel_drivername,
shiprel_instruction, shiprel_note,
shiprel_num, shiprel_status, shiprel_trailer1,
shiprel_trailer2, shiprel_vehiclereg,
shiprel_weightslipno)
index (shipcontact_num) in shipcontact
index (shipcust_num) in shipcust
index (shipprod_num) in shipprod
index (shiprel_date)
key (shiprel_num)Thanks in advance showing direction here
November 23, 2015 at 12:12 pm #1228j_ferguson
ModeratorHi Johan,
It is most likely one of two things:
1. Your Access query does not rename the field and you are passing the renamed field name
2. the value may not be encoded properly for the lookupTake a look at AccessControl.AccessGoto method. You will see the Datadict encode is one of the first things that happens. If your datadict does not inherit from Field_num it is possible that it is not being encoded properly for the lookup. You might want to add some Print statements in this method to find out if the lookup queries are doing what you expect.
November 25, 2015 at 4:37 am #1229johan@suneido
ParticipantThank you. the problem was indeed incorrect encoding of search value due to field definition. Appreciate your swift reply. Regards
-
AuthorPosts
- You must be logged in to reply to this topic.