Chris__T
Posts: 339
|
| Posted: 09/25/2007, 12:45 PM |
|
I'm entering information into a record. One of the fields is "street address". This record is going into table INFO
I would like to take the "street address" data and compare it to the same field in a different table, to see if it is in this other table.
I was thinking that when I click "add" to add the record to table INFO, it sends the street address data to a search variable on a different page, which does a search on this data, then somehow returns to results to previous page? I think I'm confusing myself!
|
 |
 |
wkempees
|
| Posted: 09/25/2007, 2:58 PM |
|
CheckOut the CCDLookUp() function or it's equivalent DLookUp Action.
ASP flavour.
"Chris__T" <Chris__T@forum.codecharge> schreef in bericht
news:646f9656f63364@news.codecharge.com...
> I'm entering information into a record. One of the fields is "street
> address".
> This record is going into table INFO
>
> I would like to take the "street address" data and compare it to the same
> field
> in a different table, to see if it is in this other table.
>
> I was thinking that when I click "add" to add the record to table INFO, it
> sends the street address data to a search variable on a different page,
> which
> does a search on this data, then somehow returns to results to previous
> page? I
> think I'm confusing myself!
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Chris__T
Posts: 339
|
| Posted: 09/26/2007, 9:33 AM |
|
Wow...the wonders of sql. Always nice to find a new tool. :)
Can I use this DLookup in a field? Could I have this in it's own column in this new record in Table B, where it looks in the other table (first table, INFO i think i called it) and displays the contents in this table B?
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 09/26/2007, 9:49 AM |
|
You can.
Fields properties, action gives ist of available actions.
One is DLookup, give it the appropriate parameters.
After reading up on this action in help or docs.
CCDLookUp is the wrapper to be used in event code. Like BeforeShow
5 minutes should be all you need, lol.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
Chris__T
Posts: 339
|
| Posted: 09/26/2007, 11:22 AM |
|
I think one of my parameters is giving it an error. The criteria parameter
Basically I want to add to this lookup (which is in table2) all the permit numbers that go with the jobsite address (from table1) that matches an address in table2
I had:
EXPRESSION: Permit_Number
DOMAIN: Permits (table1)
CRITERIA: Jobsite_Address (from table1) like GRID.Address.Value (Address in grid of lookup)
CONNECTION: Connection1
CONVERT RESULT TO: text
TYPE OF TARGET: Control
TARGET: Permit_Number2 (in table2, to store data from table1)
I know the criteria section isn't correct, but I'm wondering how to call the address value in the grid to compare to the address in table1
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 09/26/2007, 2:23 PM |
|
Sorry, am confused now. I might have given wrong solution.
First post you are discussing entering a record and wanting to lookup a value from another table.
Now you are talking about a Grid.
Please explain more detailed.
I would like to know where you put the Dlookup, Form or Grid (and type of Grid)
If it is a Grid, the easy solution is in the SQL, as long as it is not an editablegrid.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
Chris__T
Posts: 339
|
| Posted: 09/27/2007, 8:45 AM |
|
Sorry about any confusion. I think I'm confusing myself as well. 
Ok, I'll try to briefly explain what I'm trying to do. User enters data into Table2 regarding Business Licenses. In table1, there is various information about Building Permits.
Table2 business license data contains an address field for the property that is obtaining license. I want to do a Dlookup into table1 to see if that address matches any building permits. if it does, I would like to show the building permit number in table2 grid with the business license stuff.
The grid shows the data in table2, so I would like to have this permit number from table 1 show up in a column for records that it's address matches the business license address.
I had the dlookup in an unbound field in its own column, in a regular grid.
|
 |
 |
|