473,506 Members | 16,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fill in the blanks


I imported a text file that lacks a "Part Number" for each record.
Each blank below a given "Part Number" should have the same "Part
Number" until the next "Part Number".
How can I fill in the blanks?

Sample table below:

Part Number PO Number Item
3827092-111 G00026664 1110
G00026664 1181
G00026664 1229
G00026664 1342
3862002-1 G00026664 1236
G00026664 1393
3862012-1 G00026664 1236
G00026664 1393
3862144-2 G00026664 1283
G00026664 1293
G00026664 1412
G00026664 1413
4-141-089-03 G00022901 0030
Thanks, Rick

Jan 12 '07 #1
1 2073
Simplest solution might be to OpenRecordset on the table (sorted by Item
presumably.)

In your code, loop through the recordset.
If Not IsNull([Part Number]), then store the value in a variable.
Else (if it is null), Edit, assign the value from the variable, and Update.
MoveNext, and Loop until EOF.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"2D Rick" <rb*******@compuserve.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
>
I imported a text file that lacks a "Part Number" for each record.
Each blank below a given "Part Number" should have the same "Part
Number" until the next "Part Number".
How can I fill in the blanks?

Sample table below:

Part Number PO Number Item
3827092-111 G00026664 1110
G00026664 1181
G00026664 1229
G00026664 1342
3862002-1 G00026664 1236
G00026664 1393
3862012-1 G00026664 1236
G00026664 1393
3862144-2 G00026664 1283
G00026664 1293
G00026664 1412
G00026664 1413
4-141-089-03 G00022901 0030
Jan 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1679
by: Broida (spamless) | last post by:
Hi! I have a list of item and I need to populate two columns with all of the combinations (not permutations), omitting the paired elements. Example: If my list in column A has W, X, Y, Z. ...
1
3178
by: Stephen H | last post by:
I'm a newbie to writing and running code in MS Access so the more detail the better for me when answering. Thanks. My Problem ( Or Challange , I should say ) is that I import a csv file into an...
1
1698
by: Steve | last post by:
I imported data from a spreadsheet into an access table. is there a way to deal with the empty cells? currently they are empty fields but I dont know how to interact with them. This is my first...
2
1874
by: brian_harris | last post by:
I have a 3rd party unmanged .dll. This has functions that will look up information and fill a C string passed to it with data. I want to use this data in .NET classes after it has been filled and...
0
1737
by: alienstudios | last post by:
We have a table that has a multi-line per person record Here are the fields ID Gene1 Gene2 Gene3 Each person usually has two records (IE two Rows have ID 1) However in one row Gene 1 is...
8
2958
by: cwhite | last post by:
i want to create a form where the user can choose from a list of names in table A associated with this name is a telephone and address on the form there will be a drop list for the name,...
1
11550
by: tom c | last post by:
I am using Visual Web Developer 2005 Express Edition. I created a SQLDataSource just by draging the control to the form and filling in the blanks in the wizard. In code I need to use the...
34
4057
by: Registered User | last post by:
Hi experts, I'm trying to write a program that replaces two or more consecutive blanks in a string by a single blank. Here's what I did: #include <stdio.h> #include <string.h> #define MAX 80
10
2791
by: Diego F. | last post by:
Hi all. I have an application that receives a message from a socket in an array from a certain size. As the array size may be longer that the message received, the end of the array has blank...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7103
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5035
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.