1) I have a Table called "Bases" which contains fields Base,Area,Icao_code,Iata_code,Other_name,Place_name (amongst others).
2) When I update table "Operator" I need top be able to lookup Table "Bases" by searching in any of the fields mentioned in 1) above.
I've got so far and now seem to be stuck.
a) How do I get the form "Bases Add" to synch with the query table created?
b) How do I then get the correct data form the query into the correct fields on the "Operator" Form?
The Script so far:
dim q as p
dim indx as p
dim reply as c
dim reply1 as c
dim tbl as p
reply1=ui_get_list("Base File Search",1,"Base","Area","ICAO","IATA")
if reply1 = "" then
end
end if
reply=upper(ui_get_text(Reply1+" File","Enter Value"))
if reply="" then
end
end if
tbl=table.open("Bases")
basic=form.load("Bases Add","dialog")
select
case upper(reply1)=="BASE"
tbl.index_primary_put("BASE1")
query.order="Base"
query.filter="containsi(Base,Reply) .or. containsi(Other_Name,Reply) .or. containsi(Place_Name,reply)"
case upper(reply1)=="AREA"
tbl.index_primary_put("Area")
query.order="Area"
query.filter="containsi(Area,Reply)"
case upper(reply1)=="ICAO"
tbl.index_primary_put("Icao")
query.order="Icao"
query.filter="Icao_code=Reply"
case upper(reply1)=="IATA"
tbl.index_primary_put("Iata")
query.order="Iata"
query.filter="Iata_code=Reply"
end select
q=tbl.query_create()
if q.records_get() > 0 then
basic.resynch()
basic.show()
basic.activate()
q.drop()
end
ELSE
if q.records_get() = 0 then
ui_Msg_box("Place Name Search all",UPPER(Reply)+" not found.")
end if
end if
end
I am using the "containsi" statement with the hope that our friends at Alpha can come up with a fix for the poblems I have been having with Full Text Searching.
Answers on a Postcard please ....
2) When I update table "Operator" I need top be able to lookup Table "Bases" by searching in any of the fields mentioned in 1) above.
I've got so far and now seem to be stuck.
a) How do I get the form "Bases Add" to synch with the query table created?
b) How do I then get the correct data form the query into the correct fields on the "Operator" Form?
The Script so far:
dim q as p
dim indx as p
dim reply as c
dim reply1 as c
dim tbl as p
reply1=ui_get_list("Base File Search",1,"Base","Area","ICAO","IATA")
if reply1 = "" then
end
end if
reply=upper(ui_get_text(Reply1+" File","Enter Value"))
if reply="" then
end
end if
tbl=table.open("Bases")
basic=form.load("Bases Add","dialog")
select
case upper(reply1)=="BASE"
tbl.index_primary_put("BASE1")
query.order="Base"
query.filter="containsi(Base,Reply) .or. containsi(Other_Name,Reply) .or. containsi(Place_Name,reply)"
case upper(reply1)=="AREA"
tbl.index_primary_put("Area")
query.order="Area"
query.filter="containsi(Area,Reply)"
case upper(reply1)=="ICAO"
tbl.index_primary_put("Icao")
query.order="Icao"
query.filter="Icao_code=Reply"
case upper(reply1)=="IATA"
tbl.index_primary_put("Iata")
query.order="Iata"
query.filter="Iata_code=Reply"
end select
q=tbl.query_create()
if q.records_get() > 0 then
basic.resynch()
basic.show()
basic.activate()
q.drop()
end
ELSE
if q.records_get() = 0 then
ui_Msg_box("Place Name Search all",UPPER(Reply)+" not found.")
end if
end if
end
I am using the "containsi" statement with the hope that our friends at Alpha can come up with a fix for the poblems I have been having with Full Text Searching.
Answers on a Postcard please ....
Comment