After parsing i move the values form tblcustomer to tblRequest. There
are too many spaces in all the field of tblcustomer
but they all move good accept field Account number. Below is the query
which i use to move values but it still give me last
4 digit from tblcustomers.
tblcustomers
AccountNum Text 100
Value: 07836-105575-02
Input Mask: CCCCCC\-CC
tblRequest
AcctCustNum Text 15
Value: 75-02
INSERT INTO tblRequest ( AcctCustNum, CableDataDate, CreditRequested,
ZipCode, CorpNum, BoxType, Comments, CustFName,
CustLName, NewRequest, BoxQty, ReturnMethod, DateLoaded, ConverterNum,
RequestRecd, RequestRecdDtl, RequestDate,
RequestStatus, ErrorType, RequestType, SenderInitials, SenderCorp,
CableDataID )
SELECT Right(Trim([AccountNum]),9) AS AccountNo,
tblCustomers.ReturnDate, tblCustomers.CreditAmount,
Right(Trim([CityStateZip]),Len(Trim([CityStateZip]))-InStr(1,[CityStateZip],",
")) AS Zip, Left([AccountNum],5) AS Corp,
tblCustomers.BoxType, tblCustomers.Comments,
Left([Name],InStr(1,[Name]," ")-1) AS Expr,
Right(Trim([Name]),Len(Trim([Name]))-InStr(1,[Name]," ")) AS Expr2,
"Yes" AS NewWork, tblCustomers.BoxQty,
tblCustomers.ReturnMethod, tblCustomers.ImportDate,
tblCustomers.ConverterNumbers, "E Mail" AS RecdHow, "KDB" AS
RecdDetail, Left([RequestDate],10) AS ReqDate, "Open" AS ReqStat,
"Open" AS ErrTyp, tblCustomers.Subject,
Left([Sender],InStr(1,[Sender]," (")-1) AS SenderInits,
Right([Sender],4) AS SenderCorp, Left((Right([Sender],8)),3) AS
CDID
FROM tblCustomers;
pietlinden@hotmail.com - 15 Aug 2006 08:33 GMT
What error do you get? Which bits of all this information are
relevant? Is the field that cause the failure the same size in the
destination table? Try making it 255 and then getting a maximum length
of the data in that field. Then you can adjust downward if you want.
Eric - 15 Aug 2006 15:24 GMT
Thanks for reply. I sove that problem If you please help me how to i
bind this method with the textbox control. As I try to to set the value
of a text box through code and it will always display the same value in
every record. I think i cant display a recordset in a text box. What
way i use so that i can display my values in the text box.
Private Sub Form_Open(Cancel As Integer)
Dim qry As String, rst As Object
qry = "SELECT tbl_EquipmentChronology.Equipment1 FROM
tbl_EquipmentChronology INNER JOIN tbl_events ON
tbl_events.TicketNum=tbl_EquipmentChronology.TicketNum where
tbl_events.TicketNum=" &
Forms!tbl_PPVResearch_Edit!frm_Events!TicketNum & " and
tbl_events.PPVVOD_Outlet=tbl_EquipmentChronology.Outlet"
Set rst = CurrentDb.OpenRecordset(qry)
rst.MoveFirst
Do While Not rst.EOF
Forms!tbl_PPVResearch_Edit!frm_Events![Text2] = rst!Equipment1
rst.MoveNext
Loop
End Sub