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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

append query

Status
Not open for further replies.

dcarbone

Programmer
Aug 22, 2003
29
CA
How do i make an append query in access that will prompt the user for data that is to be entered into 7 different fields in a table
 
I think that you would be better off using a form that is bound to the table that you are entering data into than trying to use a query that is going to prompt the user for seven different field.


DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 
I am not promting the user for a reply.

I have a field that looks like...
John|A|Doe|30Mar2003|G1

I need to break this down into seperate fields...

i.e.
field one
John A Doe
field two
30Mar2003
field theree
G1

What is the best way to parse this type of data?

Thanks in advance
 
I think that the following might give you some help...

Dim temp1 as String, temp2 as String, temp3 as String
Dim lentemp as Integer



temp1 = Left$(String,InStr(String,1,”|”))-1
lentemp = Len(Left$(String,InStr(String,1,”|”))+1)
temp2 = Mid$(String,lentemp, InStr(String,lentemp,”|”))-1
lentemp = Len(Mid$(String,lentemp, InStr(String,lentemp,”|”))+1)
temp3 = Mid$(String,lentemp, InStr(String,lentemp,”|”))-1
lentemp = Len(Mid$(String,lentemp, InStr(String,lentemp,”|”))+1)
Name_Field = temp1 & “ “ & temp2 & “ “ & temp3
lentemp = Len(Mid$(String,lentemp, InStr(String,lentemp,”|”))+1)
Date_Field = Mid$(String,lentemp, InStr(String,lentemp,”|”))-1
lentemp = Len(Mid$(String,lentemp, InStr(String,lentemp,”|”))+1)



If you do this for each of your fields and assign them to where they should go, I think that this will help.


[yinyang]

DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top