Smart questions
Smart answers
Smart people
Join Tek-Tips Forums

Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

caosity (TechnicalUser) (OP)
15 Sep 09 23:26
I know there has to be a way to do this, but I just can't seem to find it. Is there a way to form a query using the data displayed in a field in a form as the criteria? In Access I would just use Form![fieldname, or something to that affect.
jlockley (TechnicalUser)
16 Sep 09 18:01
If you find the answer, I would like it too. A way was indicated to me by someone in the DB Community a while back, but it was far above my skill level at that time.

I found another way on line, which involves entering code for every field, and I bookmarked it somewhere. If I can find it, I will share. I have attempted to do it in a quick and dirty fashion, by attaching the form to the qbe instead of db, but it doesn't work.  
caosity (TechnicalUser) (OP)
17 Sep 09 12:07
I have tried the same thing. No luck. I assume it will take a bit of SQL, which is fine, just need to figure it out, or find someone who knows how to do it.
Kliot (Programmer)
23 Sep 09 0:05
You can easily use a variable in a query using the ~ followed by the variable name such as ~fieldVariable. To use the value of a field set a variable to the fields value then use the variable in the query. You can't use the field's value directly in a query.

I haven't used Paradox in a while so if this doesn't make sense let me know and I'll post an example.
caosity (TechnicalUser) (OP)
23 Sep 09 9:24
My apologies, but I think I may need that example. Where do I set the field variable? How do I use the variable in a query where the variable equals the value in the field as displayed on a form?

Also, while I have someone who knows how to do this, say instead of a query, I would like to open another form, or report, where the form or report displays information in other tables regarding the individual, or case number, displayed in a form field. Let me explain. I have several tables established. One of them, say General.db, holds general information regarding a case. We keep track of all our cases by a case number. Another table, say Motions.db, holds information regarding motions for each case. A new record row is created with each new motion, but the case number repeats. Both tables use composite keys which includes the case number.

I have a form set up to display the general information of a case, including the case number. I want a button to push to open the motions form, which I can do. But I want it to open to the motions in the case number displayed in the general information form, which I can't do.
kimenemark (Programmer)
21 Oct 09 9:41
Maybe this example will be usefull to you!

It's a partial query I use in an app. to build a answer table for a view!
testOE is a variable used as "variable" column name.
All names with ~ in front are variables.
All names with _ in front are table "connectors".


testOE = "S"+chrOEM(155)+"genavn"

qbe = Query

    Firma.db    | Kontonr    | ~testOE     | Navn       | Adresse1   | Adresse2  | Postnr |
                | Check _Kto | Check ~SNam | Check ~Nam | Check ~Adr | Check     | _Pst   |

    Kontakt.db  | Kontonr | Lbnr  | Kontakt     | Telefon    |
                | _Kto    | Check | Check ~Att  | Check ~Tlf |

    Postnr.db   | Postnr     | By        |
                | Check _Pst | Check ~By |

    Repair.db   |Kontonr|Garanti  |Hardware  |Fejltype  |Status    |
                |_Kto   |Check ~xG|Check ~Hdw|Check ~Ser|Check ~Sts|


Hope this will help you!
I'm not here that often but I still develop in Pdox9 :)

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close