Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEED HELP POPULATING UNBOUND FIELD

Status
Not open for further replies.

mustangirl

Programmer
Aug 16, 2001
27
US
I HAVE A FORM THAT HAS 23 UNBOUND FIELDS IN THEM. THESE UNBOUND FIELDS ARE LAYED OUT AS A TRAILER. I HAVE A LIST OF SUPPLIERS AND THE NUMBER OF SKIDS GOING TO EACH PLANT IN A CROSSTAB QUERY. I NEED IT TO READ THE RECORDSET THEN FOR EXAMPLE, IF SUPPLIER A HAS TWO SKIDS GOING TO PLANT K, THEN THE FIRST TWO BOXES NEED TO BE FILLED WITH SUPPLIER A'S NAME AND A K TO INDICATE WHERE IT IS GOING. ANY IDEAS?

SUPPLIER K I C W
A 2 0 1 0
B 0 1 1 0

BOX BOX
A-K A-K
A-C B-I
B-C

SHAWNDRA CREE JONES,
DATABASE DEVELOPER
TOYOTA MOTOR MANUFACTURING NORTH AMERICA
ERLANGER, KY
 
I would not try to use a crosstab query to build your recordset. A crosstab is nothing more than a special view of a totals query. You could probably build the needed recordset and populate the unbound controls much easier using a simple totals query where you group by Supplier and Destination. Which would in fact give you the number of records you'll need for each combination allowing placement fairly simply.
 
THAT IS GOOD ADVICE, I FIGURED THAT OUT LATER IN THE DAY THAT IT WOULD BE EASIER SO I DID CHANGE IT.
HERE IS WHAT MY CODE LOOKS LIKE SO FAR. VALUE = 2, IT PLACES SUPPLIER NAME IN SKID2, I ALSO NEED IT IN SKID1. THEN I NEED IT TO GO TO THE NEXT RECORD. THEN IT TO PICK UP THE SUPPLIER VALUE, FOR EXAMPLE 1 THEN PLACE THE SUPPLIER NAME IN SKID 3. AM I SOUNDING CONFUSING?



strName = Me.FINAL.Value
For I = 1 To strName

Me.Controls("SKID" & strName) = Me.[SHORT NAME].Value
rst.MoveNext
Next I
SHAWNDRA CREE JONES,
DATABASE DEVELOPER
TOYOTA MOTOR MANUFACTURING NORTH AMERICA
ERLANGER, KY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top