Hi,
I think I'm getting stupid as I get older...lol. What I am trying to accomplish is to compare one address field in tbl3 to an address field in tbl. If they match then a ui message box would say not to proceed. The coding seems simple to me except....it dosesn't work...lol. My code is as follows:
dim tbl as P
dim tbl3 as P
dim user as C
tbl3=table.open("ameregl3.dbf")
user=ameregl3->address
tbl=table.open("nonserve addresses.dbf")
If user=nonserve_addresses->address THEN
ui_msg_box("Attention","This is a NON SERVICE address. Do NOT Proceed",48)
Else
End
tbl.fetch_find(address)
While .NOT. tbl.fetch_EOF()
tbl.Fetch_next()
END WHILE
END IF
tbl=tbl.close()
END
Seems simple in theory but obviously I do not have enough experience in A5 yet. The above code works fine but unfortunately it doesn't seem to compare the fields in "tbl" to "tbl3" and display the message box if there is a matching address. I believe what it is doing now is checking the 1st field in "tbl" and then just fetching the other records in "tbl" without compaing them with the "address" field in tbl3. This is performed with a button on a form that is for tbl3, so in actuality (sic), tbl3 is already open.
Open to suggestions... Thanks in advance for all the help.... this includes the past. This message board has to have the greatest people out there involved.
Thanks again,
Scott
P.S. Probably won't be able to check the board again until Thursday Morning... Thx
I think I'm getting stupid as I get older...lol. What I am trying to accomplish is to compare one address field in tbl3 to an address field in tbl. If they match then a ui message box would say not to proceed. The coding seems simple to me except....it dosesn't work...lol. My code is as follows:
dim tbl as P
dim tbl3 as P
dim user as C
tbl3=table.open("ameregl3.dbf")
user=ameregl3->address
tbl=table.open("nonserve addresses.dbf")
If user=nonserve_addresses->address THEN
ui_msg_box("Attention","This is a NON SERVICE address. Do NOT Proceed",48)
Else
End
tbl.fetch_find(address)
While .NOT. tbl.fetch_EOF()
tbl.Fetch_next()
END WHILE
END IF
tbl=tbl.close()
END
Seems simple in theory but obviously I do not have enough experience in A5 yet. The above code works fine but unfortunately it doesn't seem to compare the fields in "tbl" to "tbl3" and display the message box if there is a matching address. I believe what it is doing now is checking the 1st field in "tbl" and then just fetching the other records in "tbl" without compaing them with the "address" field in tbl3. This is performed with a button on a form that is for tbl3, so in actuality (sic), tbl3 is already open.
Open to suggestions... Thanks in advance for all the help.... this includes the past. This message board has to have the greatest people out there involved.
Thanks again,
Scott
P.S. Probably won't be able to check the board again until Thursday Morning... Thx
Comment