Should I use a Case or If Statment?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have this popup form that I'm inserting information from a table that is
indexed by CTANumber. The CTANumber is located on my other popup forms so
that the users know they are looking at the right data.

The table itself has several rows of text that goes along with the number
such as:

Number Comments Date
1034 It's raining out 06/22/05
1034 Snowed today 05/19/04
1036 Whatever 04/19/03

How would I get each line of data (Number 1034) onto my form that is set up
as:

CTANumber
Comments
Date

Also, we would like the dates to be in sequence order per CTANumber.

Should this be done in a case statement or If statement and how?
 
How would I get each line of data (Number 1034) onto my form that is set up
as:

CTANumber
Comments
Date

Also, we would like the dates to be in sequence order per CTANumber.

Should this be done in a case statement or If statement and how?

No, it can be done with a Query.

Create a Query based on your table selecting these fields; sort it by
CTANumber and then by date. Base your Form on this query.

I'm not certain what you mean by "get each line of data onto my form"
- do you want to prompt the user for the CTANumber, or what?

John W. Vinson[MVP]
 
I'm not certain what you mean by "get each line of data onto my form"
- do you want to prompt the user for the CTANumber, or what?

No I don't want to prompt the user. I want the lines of each record to show
up. The same IDNumber is shown on each row, some ID's have only 1 row but
most have 2 or more (1 has 16 lines associated with 1 IDNumber). I need to
show all 16 lines per IDNumber on the Form along with it's Date.

Background: This information is coming from a Web based system and they are
converting it to MS Access database. What this table was doing was where the
user entered in comments for each time they talked with the Doctor or
Insurance Provider and posted a date as to what happened. When they
converted it to a database table each row is now attached to the IDNumber.

So I need to show all the lines (rows) that is associated with the IDNumber.
But only have the IDNumber show once on the popup form. This form is for
Viewing only no input or updating here.

Is this possible?
 
So I need to show all the lines (rows) that is associated with the IDNumber.
But only have the IDNumber show once on the popup form. This form is for
Viewing only no input or updating here.

Is this possible?

Use a Form based on the table for which the IDnumber is unique, with a
continuous Subform based on the table with the rows.


John W. Vinson[MVP]
 
Back
Top