Can a combo box be used to select where data is placed in a table???

C

commandoboy

Hello everyone,

I am writing a database to manage a quantity of different types of battery.
The battery data is imported from a textfile( the text is generic for all
battery types), however I would like to use a combo box to select the battery
type (there are 3 different types), and the battery serial number (these go
from 001 to 030). Once the type and serial number have been selected, I
would like to write the textfile, type and serial number as one record in a
table. I am fairly new to access but learning all the time, any help is
really appreciated!!!

Thankyou

Ryan
 
J

John Vinson

Hello everyone,

I am writing a database to manage a quantity of different types of battery.
The battery data is imported from a textfile( the text is generic for all
battery types), however I would like to use a combo box to select the battery
type (there are 3 different types), and the battery serial number (these go
from 001 to 030). Once the type and serial number have been selected, I
would like to write the textfile, type and serial number as one record in a
table. I am fairly new to access but learning all the time, any help is
really appreciated!!!

Thankyou

Ryan

Your table structure should have only three fields: probably a memo
field for the text (I gather it may be longer than the 255 byte limit
for a text field), the battery type, and the serial number. Your
subject line suggests that you have separate fields for each type -
this is NOT good design! Fieldnames should not contain data.

Base a Form on the table, and put a combo box for the type (and
probably the serial number as well). You may need to adapt the code
you're using to import the textfile - it's not clear to me how you are
now doing so.

If I'm misunderstanding, please post the fieldnames, data types, and
significance of the fields in your table.

John W. Vinson[MVP]
 
C

commandoboy

John,

I am importing 31 fields from the textfile ( tab delimited, first row
contains field names). The info is currently being imported to the table
using VBA code. What I would like to do is create two more field names in
the table (Battery type and serial number). The combo boxes will be used to
select the Battery type and serial number, this selected info will populate
the table when the data is imported from the textfile.

I currently have the combo boxes selecting the battery type and serial number
out of two tables, I just need to take this information and place it into the
'Battery info table'.

Please forgive me, I am a begginer in this game, I will appreciate any help!!
!

Thank you!!

P.S. I could send you the file if you so wished, a picture paints a thousand
words......
 
J

John Vinson

John,

I am importing 31 fields from the textfile ( tab delimited, first row
contains field names). The info is currently being imported to the table
using VBA code. What I would like to do is create two more field names in
the table (Battery type and serial number). The combo boxes will be used to
select the Battery type and serial number, this selected info will populate
the table when the data is imported from the textfile.

So it sounds like you're importing MULTIPLE rows of data... right?
I currently have the combo boxes selecting the battery type and serial number
out of two tables, I just need to take this information and place it into the
'Battery info table'.

It sounds like you're trying to store the same information in two
different places... which you should not ever need to do. Relational
databases use the "Grandmother's Pantry Principle": "a place - ONE
place! - for everything, everything in its place".
Please forgive me, I am a begginer in this game, I will appreciate any help!!
!

Thank you!!

P.S. I could send you the file if you so wished, a picture paints a thousand
words......

Sorry, personal EMail support is reserved for paying customers.
Instead, please post the names of the tables in your database;
indicate how you're importing the data; and just what it is that you
want to update using the combo boxes.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top