Steve,

I am still not sure what you are trying to accomplish. I gave you a couple
of generic examples, based on the information provided, that should have
gotten you started. To help you accomplish what you need, you need to
specify:

The tables you want to use
Which columns are in which tables (provide table structures)
What are the linking columns (if they do not have the same name)
The conditions you want to check for each table

In your examples below I see several problems:

>>>
1st
Variable
- vthis_hub <= 999999
<<<
Are your defining the variable vthis_hub as <= 999999? A variable can only
be defined as equal to a value, another variable or the value of a specific
column in a table. If the value is entered at run time, then it should be in
a variable...is that what vthis_hub is?
If this variable is always <= 999999, then the condition will always be true
and you do not need it in your expression in the first place.
Also, if the procedure is based on whether the value is <=999999, you might
consider using and IF-THEN-ELSE construct and avoid the count when not
needed.

>>>
SEL COUNT(*) INTO vrows INDIC iv2 where vthis_hub <= 999999 (?) and FROM
Customer WHERE Custnub2 = +
.this_custnub2 and ParentCustId = 105
<<<
It looks like you are trying to get a count based on conditions on two
tables; however, it looks like the first table name is missing and hence you
have a statement with two WHERE conditions and only one table.

Again, look a t the examples I provided where both tables are used and the
sub-select is used to link the tables through a common column. If you still
cannot get it to work, post the information I suggested above and I am sure
you will get a solution.

Javier,

Javier Valencia, PE
913-397-9605 Home
913-915-3137 Cell
913-649-2904 FAX


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Steve Breen
Sent: Monday, December 14, 2009 5:59 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Displaying Message On Form on Initial Entry of Data

I am trying to display a message in a Form based on the following:
 
1st
Variable
- vthis_hub <= 999999
Note: This is not in a table during data entry just in the form and the
variable.
 
Next:
FROM Customer WHERE Custnub2 = .this_custnub2 and ParentCustId = 105

 
Tried to do it the following way, but can not figure out how to combine
a variable not in a table and data from a table.
 
 
 
-- Warranty.rmd   
-- Set variable vwarranty
-- Used to remind a user to Check A Spread Sheet for Customer Equipment
Verification
-- Major Assumption - var This_CustNub2 is set on form entry
-- Major Assumption - var vThis_hub is set on form entry

Clear var vWarrant

SEL COUNT(*) INTO vrows INDIC iv2 where vthis_hub <= 999999 (?) and FROM
Customer WHERE Custnub2 = +
.this_custnub2 and ParentCustId = 105

IF vrows > 0 THEN

SET VAR vwarranty = 'Check warranty coverage for the unit before
handling Breakdown'
ELSE
SET VAR vwarranty = 'TEST'
ENDIF

RECALC VARIABLES 

RETURN

 
ny recommendations?
 
 
Stephen Breen
CDI Services, Inc.
 
 

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: 
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, 
place any 
text to search for.
================================================


Reply via email to