I need to capture user input after user clicks append query button and types in an order number. with this captured il use the variable to compare it to the delete from archeive query
35 3677
Your question is far from clear.
It sounds as if you are trying to find a record from a table or query.
Could you rephrase the question and tell us what you are trying to achieve, rather than the detail about capture & buttons.
Phil
if i could find a way to post a screen shot i think that would help, if i had a guess i would say the setfocus methodmight help
Use PrintScreen to capture your screen.
Use Paint to crop it to the relevant area. Shrink it to about 3" wide and 2" high. Is it still easy to read?
Then on this website use the Advanced Tab ->> Insert --> Manage Attachmente to select the image. Select Upload
If you double click on the image, it will show something like https://bytes.com/attachment.php?att...1&d=1516724952 as it's addtress.
Copy that address and on this website, click the Inset Image (Yellow) symbol.
Paste the address into that.
Good luck
Phil
i think i have it as an attachment circled in blue is what im trying to get to compare values
this is the vba code associated with the button circled up top in blue
So are you basically saying you want to select an existing order and use it as a "Template" for a new order?
Phil
yea i would like to manupulate that user entry from that append query text box in my VBA code
So first, don't use an input box to find an order, use a Combo Box to select an existing order as the template.
So briefly, on the AfterUpdate of the Combo,
1)ind the order
In your VBA have variable corresponding to the fields that you want to use in your template (it almost certainly will not be all of them)
Sorry, if you hit a tab key the message gets sent, Bad website design, certainly not going to blame myself for hitting the wrong key.
1) Find the order to use as a template.
2) In your VBA have variable corresponding to the fields that you want to use in your template (it almost certainly will not be all of them)
3) Save those fields from the Template Record to your variables
4) Use the AddNew to go to a new record
5) Load the variables back to the required fields in your new record
6) Update the new record
Hope that helps
Phil
would it be hard to use a drop box if i have thousands of records for that feild
NeoPa 32,556
Expert Mod 16PB BWCooper:
this is the vba code associated with the button circled up top in blue
Please don't post code as a picture! We have [CODE] tags that allow you to post the code so that it can be worked with more easily. A picture is wasteful of disk space and little use to anyone trying to help you.
Sorry, "thousands of records for that feild" makes no sense to me, even if your post should have been "thousands of records for that field".
A field is an item of data within a record.
What has DropBox got to do with anything?
Phil
- Private Sub Add_Repeat_Order_Click()
-
On Error GoTo Err_Add_Repeat_Order_Click
-
-
Dim stDocName As String
-
Dim stValue As String
-
-
stDocName = "Add Repeat Order"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
-
' DoCmd.GoToRecord
-
-
stValue = Forms![Order Master]![Add Repeat Order]!Value
-
MsgBox "value = " + stValue
-
-
Exit_Add_Repeat_Order_Click:
-
Exit Sub
-
-
Err_Add_Repeat_Order_Click:
-
MsgBox Err.Description
-
Resume Exit_Add_Repeat_Order_Click
-
-
End Sub
NeoPa 32,556
Expert Mod 16PB
Well done. I didn't expect that retrospectively but it's good that you've done it.
Now I would suggest you re-engage with Phil's last post and help him understand where you're currently at and what you still need.
Good luck :-)
Ok i have taken your advise and going for the combobox idea, i have created a combo box to look up OrderNumber in the ARCHIVE table when i do this i want to take the record and feilds assosiated with it and appened the record to the Order Master table also at the same time i want the same record typed in to the combo box to populate the feilds in the form
NOTE: the record source for the form is Order Master Table and the record source for the combo button is Archive Table
Some code i guessed on for the combobox - Private Sub Combo963_AfterUpdate()
-
-
Dim rs As Object
-
-
Set rs = Me.Recordset.Clone
-
rs.FindFirst "[ID] = " & Str(Nz(Me![Combo963], 0))
-
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
-
-
Dim dbs As Database
-
Set dbs = OpenDatabase("ALVIN_7.mdb")
-
dbs.Execute "INSERT INTO Order Master" & "select *" & "FROM Archive" & "WHERE Table![Archeive]![Order Number] Equal rs"
-
End Sub
Keeps giving me error on sql INSERT INTO statement
Not the way I would so let's get back to first principles.
On your Archive table, do you have an OrderID (AutoNumber) an Order No and a Customer (The customer should be in a separate table and there should be a CustomerID in the Archive table.
So the Combo Box should have the ControlSorce based on a query that shows the 3 fields above (or whatever is easiest to find the "template".
Assuming Column 1 is the bound column and bound to the order ID having selected it, you need something like this (Air code and unchecked)
Incidently Combo963 isn't very helpful, so I have changed it to CboFindArchive -
Private Sub CboFindArchive_AfterUpdate()
-
-
Dim MyDb as database
-
Dim ArchiveSet as RecordSet
-
Dim CurrentSet as RecordSet
-
Dim StrSQL as String
-
' The fields below represent the fields you want to add to your new record
-
' So Name them appropriately and give them the correct datatypes
-
Dim Save1 as String
-
Dim Save2 as Long
-
Dim Save3 as Long
-
Dim Save5 as String
-
'... etc
-
-
StrSQL = "SELECT TblArchive.* FROM TblArhive WHERE OrderID = " & CboFindArchive & ";"
-
-
Set MyDb = CurrentDb
-
-
' This opens the single "Template Record"
-
Set ArchiveSet = MyDb.OpenRecordset(StrSQL)
-
-
With ArchiveSet
-
Save1 = !OrderNo
-
Save2 = !CustomerID
-
Save3 = !JobTypeID
-
Save4 = !DeliveryMethod
-
' ... etc
-
.Close
-
Set ArchiveSet = Nothing
-
End with
-
-
' So we have captured all the data we want from the "Template"
-
' Now create the new record in the Current Table
-
' Assume that the field names are the same in both tables
-
-
StrSQL = "SELECT TblCurrent.* FROM TblCurrent;"
-
-
Set CurrentSet = MyDb.OpenRecordset(StrSQL)
-
-
With CurrentSet
-
.AddNew
-
!OrderNo = Save1
-
!CustomerID = Save2
-
!JobTypeID = Save3
-
DeliveryMethod = Save4
-
' ... etc
-
.Update
-
.Close
-
Set CurrentSet = Nothing
-
End with
-
-
' So Now we have a new record in the table, its a matter of getting to it on the form
-
-
Me.Requert
-
DoCmd.GotoRecord acLast
-
-
End Sub
-
See how you get on
Phil
ok makes sense is there an easier way to get all the fields on the the table here are my fields names in an attachment
This strSQL does not work - StrSQL = "SELECT Archive.* FROM Archive WHERE [Order Number] = " & Combo963 & ";"
-
-
Set MyDb = CurrentDb
-
-
' This opens the single "Template Record"
-
Set ArchiveSet = MyDb.OpenRecordset(StrSQL)
Red is the combobox that i selected "find a record on my form based on the value i selected in my combo box"
and when i select an order number with this red combobox it populates the feilds on the form,
but the blue combo box i selected "i want the combobox to look up the values in a table or query" then linked the bluecombo box to the ARCHEIVE table. i want this blue combobox to act like the red.
what i want it to do
>user selects order number in blue combo box
>program takes record that matches with the order number and add the record to the Order Master Table
>then automatically update the red combobox to show the new record so the form gets populated with this new record
You don't say what is going wrong.
What precisely is is the RowSource of Combo963?
You have defined all your Save Fields as strings, then tried to load numbers and dates into those fields.
In the example I gave you I was careful to define different data types to match the data types in your records.
Let's get one thing at a time correct. There is no point in worrying about the form till you can see the new record in the table.
Phil
this is the new and approved code with updated data types
here are some pictures of creating the combobox and a picture of the error code and where it says it is at ,
ps the row source for the combobox is the archive table the source for the form is the order master
Sorry, that doesn't help.
Against the RowSource for the Combo box you should have something that starts off
"SELECT .........." and probably should start
"SELECT ID, [Order Number], .......
When you get the error message, press the DEBUG Button, and that will show the line of code that the error occurred on. It almost certainly will be something like trying to load text into a numeric field or something similar.
Can you also check that all the numeric fields in your Archive table are type Integer. The Default is usually Long. So you may be trying to put a Long Data Type into an Integer Data Type
Phil
i think the error lies in here - StrSQL = "SELECT * FROM Archive WHERE [Order Number] = " & Combo963 & ";"
-
-
Set MyDb = CurrentDb
-
-
' This opens the single "Template Record"
-
Set ArchiveSet = MyDb.OpenRecordset(StrSQL)
ive been trying different methods like - 'Dim rs As Recordset
-
'Set rs = CurrentDb.OpenRecordset("SELECT .* FROM [TableName] WHERE CountNo = 5", dbOpenDynaset)
-
-
'StrSQL = "SELECT Archive.* FROM Archive WHERE [Order Number] = rs"
-
Set CurrentSet = CurrentDb.OpenRecordset("SELECT Archive.* FROM [Archive] WHERE [Order Number] = me![Combo970] ", dbOpenDynaset)
-
-
'Set ArchiveSet = MyDb.OpenRecordset(StrSQL)
-
-
' This opens the single "Template Record"
ok when i use this code it works with out any errors but it isnt saving any of the records on the Order Master table after update - StrSQL = "SELECT Archive.* FROM Archive "
-
Set MyDb = CurrentDb
-
-
' This opens the single "Template Record"
-
Set ArchiveSet = MyDb.OpenRecordset(StrSQL)
I got this to run and it did not put a record in the Order master table - StrSQL = "SELECT Archive.* FROM Archive WHERE [Order Number] = '084446714225' "
-
Set MyDb = CurrentDb
-
-
' This opens the single "Template Record"
-
Set ArchiveSet = MyDb.OpenRecordset(StrSQL)
-
Ok got a code that ran an put a record into the order master table
here is the working code - Private Sub Combo970_Change()
-
Dim rs As Object
-
-
Set rs = Me.Recordset.Clone
-
rs.FindFirst "[ID] = " & Str(Nz(Me![Combo970], 0))
-
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
-
-
Dim MyDb As Database
-
Dim ArchiveSet As Recordset
-
Dim CurrentSet As Recordset
-
Dim StrSQL As String
-
' The fields below represent the fields you want to add to your new record
-
' So Name them appropriately and give them the correct datatypes
-
Dim Save2 As String
-
-
Dim Save4 As String
-
-
Dim Save7 As String
-
Dim Save8 As String
-
-
-
StrSQL = "SELECT Archive.[Order Number], Archive.[Customer], Archive.[Sales Rep], Archive.[Parts] FROM Archive WHERE [Order Number] = '084446714225'" 'Me![Combo970]"
-
Set MyDb = CurrentDb
-
-
' This opens the single "Template Record"
-
Set ArchiveSet = MyDb.OpenRecordset(StrSQL)
-
-
With ArchiveSet
-
Save2 = ![Order Number]
-
'Save3 = ![Date Entered Into Alvin]
-
Save4 = ![Customer]
-
'Save5 = ![Received]
-
'Save6 = ![Need By]
-
Save7 = ![Sales Rep]
-
Save8 = ![Parts]
-
'Save9 = ![Scheduled Ship]
-
.Close
-
Set ArchiveSet = Nothing
-
End With
-
-
' So we have captured all the data we want from the "Template"
-
' Now create the new record in the Current Table
-
' Assume that the field names are the same in both tables
-
-
StrSQL = "SELECT [Order Master].* FROM [Order Master];"
-
-
Set CurrentSet = MyDb.OpenRecordset(StrSQL)
-
-
With CurrentSet
-
.AddNew
-
![Order Number] = Save2
-
'![Date Entered Into Alvin] = Save3
-
![Customer] = Save4
-
'![Received] = Save5
-
'![Need By] = Save6
-
![Sales Rep] = Save7
-
![Parts] = Save8
-
'![Scheduled Ship] = Save9
-
-
.Update
-
.Close
-
Set CurrentSet = Nothing
-
End With
-
-
' So Now we have a new record in the table, its a matter of getting to it on the form
-
-
' Me.Requery
-
' DoCmd.GoToRecord acLast
-
End Sub
i beleve my problem is right here im tring to compare a string to an interger assuming the combobox value is integer - WHERE [Order Number] = cstr(Me![Combo970])"
Sorry, I can't help unless you answer the questions I ask.
Phil
NeoPa 32,556
Expert Mod 16PB
May I suggest that you go back to the last post of Phil's and read it carefully. Find the last post where he asks for any information and read that carefully.
When you've done that prepare a response that ensures that any and all of his questions have been given as good answers as you can. Pay particular attention to the idea that the responses are appropriate to the questions.
With such an approach you will have much more luck getting solutions for your problems.
here is my full working code - Private Sub Combo970_AfterUpdate()
-
Dim rs As Object
-
-
' Set rs = Me.Recordset.Clone
-
' rs.FindFirst "[ID] = " & Str(Nz(Me![Combo970], 0))
-
' If Not rs.EOF Then Me.Bookmark = rs.Bookmark
-
-
Dim MyDb As Database
-
Dim ArchiveSet As Recordset
-
Dim CurrentSet As Recordset
-
Dim StrSQL As String
-
' The fields below represent the fields you want to add to your new record
-
' So Name them appropriately and give them the correct datatypes
-
Dim Save2 As String
-
Dim Save4 As String
-
Dim Save5 As Date
-
Dim Save6 As Date
-
Dim Save7 As String
-
Dim Save8 As String
-
Dim Save9 As Date
-
Dim Save10 As Integer
-
Dim Save11 As Integer
-
Dim Save12 As Long
-
Dim Save13 As Integer
-
Dim Save14 As Boolean
-
Dim Save15 As String
-
Dim Save16 As String
-
Dim Save17 As String
-
Dim Save18 As String
-
Dim Save19 As String
-
Dim Save20 As Date
-
Dim Save21 As Date
-
Dim Save22 As Integer
-
Dim Save23 As Date
-
Dim Save24 As Date
-
Dim Save25 As Date
-
Dim Save26 As Date
-
Dim Save27 As Date
-
Dim Save28 As Date
-
Dim Save29 As String
-
Dim Save30 As Date
-
Dim Save31 As Boolean
-
Dim Save32 As String
-
Dim Save33 As Integer
-
Dim Save34 As String
-
Dim Save35 As Integer
-
Dim Save36 As Integer
-
Dim Save37 As Integer
-
Dim Save38 As Integer
-
Dim Save39 As Integer
-
Dim Save40 As Integer
-
Dim Save41 As Integer
-
Dim Save42 As Integer
-
Dim Save43 As Integer
-
Dim Save44 As String
-
Dim Save45 As String
-
Dim Save46 As Integer
-
Dim Save47 As Integer
-
Dim Save48 As Integer
-
Dim Save49 As Integer
-
Dim Save50 As String
-
Dim Save51 As Integer
-
Dim Save52 As Integer
-
Dim Save53 As String
-
Dim Save54 As Boolean
-
Dim Save55 As Integer
-
Dim Save56 As Integer
-
Dim Save57 As Integer
-
Dim Save58 As Integer
-
Dim Save59 As String
-
Dim Save60 As Integer
-
Dim Save61 As Integer
-
Dim Save62 As Integer
-
Dim Save63 As String
-
Dim Save64 As Boolean
-
Dim Save65 As Date
-
Dim Save66 As Date
-
Dim Save67 As Date
-
Dim Save68 As Date
-
Dim Save69 As Date
-
Dim Save70 As Date
-
Dim Save71 As Boolean
-
Dim Save72 As Date
-
Dim Save73 As Boolean
-
Dim Save74 As Integer
-
Dim Save75 As Date
-
Dim Save76 As Integer
-
Dim Save77 As Integer
-
Dim Save78 As Integer
-
Dim Save79 As Integer
-
Dim Save80 As Date
-
Dim Save81 As Integer
-
Dim Save82 As Integer
-
Dim Save83 As Integer
-
Dim Save84 As Integer
-
Dim Save85 As Integer
-
Dim Save86 As Integer
-
Dim Save87 As Integer
-
Dim Save88 As String
-
Dim Save89 As String
-
Dim Save90 As String
-
Dim Save91 As String
-
Dim Save92 As String
-
Dim Save93 As String
-
Dim Save94 As Date
-
Dim Save95 As Date
-
Dim Save96 As String
-
Dim Save97 As String
-
Dim Save98 As String
-
-
-
StrSQL = "SELECT Archive.[Order Number], Archive.[Customer],Archive.[Received],Archive.[Need By], Archive.[Sales Rep], Archive.[Parts]," & _
-
"[Archive].[Scheduled Ship],[Archive].[Width],[Archive].[Length],[Archive].[Quantity],[Archive].[Delivery Method],[Archive].[Midax],[Archive].[WCSS]," & _
-
"Archive.[Job Type],Archive.[Why],Archive.[Service Rep], Archive.[Why Reop], Archive.[Plate Date],Archive.[Press Date], Archive.[Press Sequence]," & _
-
"Archive.[Collator Date],Archive.[Offline Date], Archive.[Paper Due], Archive.[Carbon Due],Archive.[Die Due],Archive.[Ink Due]," & _
-
"Archive.[Repeat Order Numbers],Archive.[Misc Due],Archive.[Companion Order], Archive.[Companion Order Number], Archive.[Press],Archive.[No Parts]," & _
-
"Archive.[No Wide],Archive.[Calc Length],Archive.[Speed],Archive.[Calc Hrs], Archive.[Completed],Archive.[Remaining],Archive.[Additional Hrs]," & _
-
"Archive.[No of Inks Face],Archive.[No of Inks Back] , Archive.[Die Number(s) Face], Archive.[Die Number(s) Liner], Archive.[Collator No:]," & _
-
"Archive.[Calc Collator Hours] , Archive.[CompletedC],Archive.[RemainingC],Archive.[Collator Delivery], Archive.[Offline Machine No]," & _
-
"Archive.[Calc roto Hrs],Archive.[Feet Per Core roto], Archive.[Order Complete],Archive.[Collator Speed],Archive.[Offline Speed]," & _
-
"Archive.[No Wide Thru Collator],Archive.[Calc Length Thru Collator],Archive.[No Wide Thru Roto],Archive.[Calc Length Thru roto]," & _
-
"Archive.[Completed roto Hrs],Archive.[Remaining roto Hrs],Archive.[Offline Delivery roto],Archive.[Exact Repeat] , Archive.[Cores Due]," & _
-
"Archive.[Cartons Due], Archive.[Ribbons Due], Archive.[Laminate Due], Archive.[Cleaning Cards Due],Archive.[Chip Due] , Archive.[Tamarack]," & _
-
"Archive.[Backer Die Due] , Archive.[Quadrel], Archive.[Quadrel No], Archive.[Quadrel Date], Archive.[completed quad hrs]," & _
-
"Archive.[Remaining Hrs- Quadrel], Archive.[Calc Length Thru quardel], Archive.[Tamarack Machine No], Archive.[Tamarack date]," & _
-
"Archive.[Remaining Hr-Tamarack],Archive.[Calc Length Thru tamarack],Archive.[completed tam hrs], Archive.[Roto Machine No],Archive.[Quad speed]," & _
-
"Archive.[tam speed], Archive.[roto speed],Archive.[Feet Per Core Tam],Archive.[Feet Per Core quad], Archive.[Offline Delivery tam],Archive.[Offline Delivery quad]," & _
-
"Archive.[No Wide Thru quad],Archive.[No Wide Thru Tam],Archive.[Special Pallets Due],Archive.[Security Tape Due],Archive.[Content Number]," & _
-
"Archive.[Plate Length],Archive.[Number Wide Plates] FROM Archive WHERE [Order Number] = '" & Me![Combo970] & "' " 'Me![Combo970]"
-
Set MyDb = CurrentDb
-
-
' This opens the single "Template Record"
-
Set ArchiveSet = MyDb.OpenRecordset(StrSQL)
-
-
With ArchiveSet
-
Save2 = Nz(![Order Number])
-
Save4 = Nz(![Customer])
-
Save5 = Nz(![Received])
-
Save6 = Nz(![Need By])
-
Save7 = Nz(![Sales Rep])
-
Save8 = Nz(![Parts])
-
Save9 = Nz(![Scheduled Ship])
-
Save10 = Nz(![Width])
-
Save11 = Nz(![Length])
-
Save12 = Nz(![Quantity])
-
Save13 = Nz(![Delivery Method])
-
Save14 = Nz(![Midax])
-
Save15 = Nz(![WCSS])
-
Save16 = Nz(![Job Type])
-
Save17 = Nz(![Why])
-
Save18 = Nz(![Service Rep])
-
Save19 = Nz(![Why Reop])
-
Save20 = Nz(![Plate Date])
-
Save21 = Nz(![Press Date])
-
Save22 = Nz(![Press Sequence])
-
Save23 = Nz(![Collator Date])
-
Save24 = Nz(![Offline Date])
-
Save25 = Nz(![Paper Due])
-
Save26 = Nz(![Carbon Due])
-
Save27 = Nz(![Die Due])
-
Save28 = Nz(![Ink Due])
-
Save29 = Nz(![Repeat Order Numbers])
-
Save30 = Nz(![Misc Due])
-
Save31 = Nz(![Companion Order])
-
Save32 = Nz(![Companion Order Number])
-
Save33 = Nz(![Press])
-
Save34 = Nz(![No Parts])
-
Save35 = Nz(![No Wide])
-
Save36 = Nz(![Calc Length])
-
Save37 = Nz(![Speed])
-
Save38 = Nz(![Calc Hrs])
-
Save39 = Nz(![Completed])
-
Save40 = Nz(![Remaining])
-
Save41 = Nz(![Additional Hrs])
-
Save42 = Nz(![No of Inks Face])
-
Save43 = Nz(![No of Inks Back])
-
Save44 = Nz(![Die Number(s) Face])
-
Save45 = Nz(![Die Number(s) Liner])
-
Save46 = Nz(![Collator No:])
-
Save47 = Nz(![Calc Collator Hours])
-
Save48 = Nz(![CompletedC])
-
Save49 = Nz(![RemainingC])
-
Save50 = Nz(![Collator Delivery])
-
Save51 = Nz(![Offline Machine No])
-
Save52 = Nz(![Calc roto Hrs])
-
Save53 = Nz(![Feet Per Core roto])
-
Save54 = Nz(![Order Complete])
-
Save55 = Nz(![Collator Speed])
-
Save56 = Nz(![Offline Speed])
-
Save57 = Nz(![No Wide Thru Collator])
-
Save58 = Nz(![Calc Length Thru Collator])
-
Save59 = Nz(![No Wide Thru Roto])
-
Save60 = Nz(![Calc Length Thru roto])
-
Save61 = Nz(![Completed roto Hrs])
-
Save62 = Nz(![Remaining roto Hrs])
-
Save63 = Nz(![Offline Delivery roto])
-
Save64 = Nz(![Exact Repeat])
-
Save65 = Nz(![Cores Due])
-
Save66 = Nz(![Cartons Due])
-
Save67 = Nz(![Ribbons Due])
-
Save68 = Nz(![Laminate Due])
-
Save69 = Nz(![Cleaning Cards Due])
-
Save70 = Nz(![Chip Due])
-
Save71 = Nz(![Tamarack])
-
Save72 = Nz(![Backer Die Due])
-
Save73 = Nz(![Quadrel])
-
Save74 = Nz(![Quadrel No])
-
Save75 = Nz(![Quadrel Date])
-
Save76 = Nz(![completed quad hrs])
-
Save77 = Nz(![Remaining Hrs- Quadrel])
-
Save78 = Nz(![Calc Length Thru quardel])
-
Save79 = Nz(![Tamarack Machine No])
-
Save80 = Nz(![Tamarack date])
-
Save81 = Nz(![Remaining Hr-Tamarack])
-
Save82 = Nz(![Calc Length Thru tamarack])
-
Save83 = Nz(![completed tam hrs])
-
Save84 = Nz(![Roto Machine No])
-
Save85 = Nz(![Quad speed])
-
Save86 = Nz(![tam speed])
-
Save87 = Nz(![roto speed])
-
Save88 = Nz(![Feet Per Core tam])
-
Save89 = Nz(![Feet Per Core quad])
-
Save90 = Nz(![Offline Delivery tam])
-
Save91 = Nz(![Offline Delivery quad])
-
Save92 = Nz(![No Wide Thru quad])
-
Save93 = Nz(![No Wide Thru Tam])
-
Save94 = Nz(![Special Pallets Due])
-
Save95 = Nz(![Security Tape Due])
-
Save96 = Nz(![Content Number])
-
Save97 = Nz(![Plate Length])
-
Save98 = Nz(![Number Wide Plates])
-
.Close
-
Set ArchiveSet = Nothing
-
End With
-
-
StrSQL = "SELECT [Order Master].[Order Number],[Order Master].[Customer],[Order Master].[Received],[Order Master].[Need By],[Order Master].[Sales Rep], [Order Master].[Parts]," & _
-
"[Order Master].[Scheduled Ship],[Order Master].[Width],[Order Master].[Length],[Order Master].[Quantity],[Order Master].[Delivery Method],[Order Master].[Midax],[Order Master].[WCSS]," & _
-
"[Order Master].[Job Type],[Order Master].[Why],[Order Master].[Service Rep], [Order Master].[Why Reop], [Order Master].[Plate Date],[Order Master].[Press Date], [Order Master].[Press Sequence]," & _
-
"[Order Master].[Collator Date],[Order Master].[Offline Date], [Order Master].[Paper Due], [Order Master].[Carbon Due],[Order Master].[Die Due],[Order Master].[Ink Due]," & _
-
"[Order Master].[Repeat Order Numbers],[Order Master].[Misc Due],[Order Master].[Companion Order], [Order Master].[Companion Order Number], [Order Master].[Press],[Order Master].[No Parts]," & _
-
"[Order Master].[No Wide],[Order Master].[Calc Length],[Order Master].[Speed],[Order Master].[Calc Hrs], [Order Master].[Completed],[Order Master].[Remaining],[Order Master].[Additional Hrs]," & _
-
"[Order Master].[No of Inks Face],[Order Master].[No of Inks Back] ,[Order Master].[Die Number(s) Face], [Order Master].[Die Number(s) Liner], [Order Master].[Collator No:]," & _
-
"[Order Master].[Calc Collator Hours] , [Order Master].[CompletedC],[Order Master].[RemainingC],[Order Master].[Collator Delivery],[Order Master].[Offline Machine No]," & _
-
"[Order Master].[Calc roto Hrs],[Order Master].[Feet Per Core roto], [Order Master].[Order Complete],[Order Master].[Collator Speed],[Order Master].[Offline Speed]," & _
-
"[Order Master].[No Wide Thru Collator],[Order Master].[Calc Length Thru Collator],[Order Master].[No Wide Thru Roto],[Order Master].[Calc Length Thru roto]," & _
-
"[Order Master].[Completed roto Hrs],[Order Master].[Remaining roto Hrs],[Order Master].[Offline Delivery roto],[Order Master].[Exact Repeat],[Order Master].[Cores Due]," & _
-
"[Order Master].[Cartons Due], [Order Master].[Ribbons Due], [Order Master].[Laminate Due],[Order Master].[Cleaning Cards Due],[Order Master].[Chip Due],[Order Master].[Tamarack]," & _
-
"[Order Master].[Backer Die Due] , [Order Master].[Quadrel], [Order Master].[Quadrel No], [Order Master].[Quadrel Date],[Order Master].[completed quad hrs]," & _
-
"[Order Master].[Remaining Hrs- Quadrel], [Order Master].[Calc Length Thru quardel], [Order Master].[Tamarack Machine No], [Order Master].[Tamarack date]," & _
-
"[Order Master].[Remaining Hr-Tamarack],[Order Master].[Calc Length Thru tamarack],[Order Master].[completed tam hrs], [Order Master].[Roto Machine No],[Order Master].[Quad speed]," & _
-
"[Order Master].[tam speed], [Order Master].[roto speed],[Order Master].[Feet Per Core tam],[Order Master].[Feet Per Core quad], [Order Master].[Offline Delivery tam],[Order Master].[Offline Delivery quad]," & _
-
"[Order Master].[No Wide Thru quad],[Order Master].[No Wide Thru Tam],[Order Master].[Special Pallets Due],[Order Master].[Security Tape Due],[Order Master].[Content Number]," & _
-
"[Order Master].[Plate Length],[Order Master].[Number Wide Plates] FROM [Order Master];"
-
Set CurrentSet = MyDb.OpenRecordset(StrSQL)
-
-
With CurrentSet
-
.AddNew
-
![Order Number] = Save2
-
-
![Customer] = Save4
-
![Received] = Save5
-
![Need By] = Save6
-
![Sales Rep] = Save7
-
![Parts] = Save8
-
![Scheduled Ship] = Save9
-
![Width] = Save10
-
![Length] = Save11
-
![Quantity] = Save12
-
![Delivery Method] = Save13
-
![Midax] = Save14
-
![WCSS] = Save15
-
![Job Type] = Save16
-
![Why] = Save17
-
![Service Rep] = Save18
-
![Why Reop] = Save19
-
![Plate Date] = Save20
-
![Press Date] = Save21
-
![Press Sequence] = Save22
-
![Collator Date] = Save23
-
![Offline Date] = Save24
-
![Paper Due] = Save25
-
![Carbon Due] = Save26
-
![Die Due] = Save27
-
![Ink Due] = Save28
-
![Repeat Order Numbers] = Save29
-
![Misc Due] = Save30
-
![Companion Order] = Save31
-
![Companion Order Number] = Save32
-
![Press] = Save33
-
![No Parts] = Save34
-
![No Wide] = Save35
-
![Calc Length] = Save36
-
![Speed] = Save37
-
![Calc Hrs] = Save38
-
![Completed] = Save39
-
![Remaining] = Save40
-
![Additional Hrs] = Save41
-
![No of Inks Face] = Save42
-
![No of Inks Back] = Save43
-
![Die Number(s) Face] = Save44
-
![Die Number(s) Liner] = Save45
-
![Collator No:] = Save46
-
![Calc Collator Hours] = Save47
-
![CompletedC] = Save48
-
![RemainingC] = Save49
-
![Collator Delivery] = Save50
-
![Offline Machine No] = Save51
-
![Calc roto Hrs] = Save52
-
![Feet Per Core roto] = Save53
-
![Order Complete] = Save54
-
![Collator Speed] = Save55
-
![Offline Speed] = Save56
-
![No Wide Thru Collator] = Save57
-
![Calc Length Thru Collator] = Save58
-
![No Wide Thru Roto] = Save59
-
![Calc Length Thru roto] = Save60
-
![Completed roto Hrs] = Save61
-
![Remaining roto Hrs] = Save62
-
![Offline Delivery roto] = Save63
-
![Exact Repeat] = Save64
-
![Cores Due] = Save65
-
![Cartons Due] = Save66
-
![Ribbons Due] = Save67
-
![Laminate Due] = Save68
-
![Cleaning Cards Due] = Save69
-
![Chip Due] = Save70
-
![Tamarack] = Save71
-
![Backer Die Due] = Save72
-
![Quadrel] = Save73
-
![Quadrel No] = Save74
-
![Quadrel Date] = Save75
-
![completed quad hrs] = Save76
-
![Remaining Hrs- Quadrel] = Save77
-
![Calc Length Thru quardel] = Save78
-
![Tamarack Machine No] = Save79
-
![Tamarack date] = Save80
-
![Remaining Hr-Tamarack] = Save81
-
![Calc Length Thru tamarack] = Save82
-
![completed tam hrs] = Save83
-
![Roto Machine No] = Save84
-
![Quad speed] = Save85
-
![tam speed] = Save86
-
![roto speed] = Save87
-
![Feet Per Core tam] = Save88
-
![Feet Per Core quad] = Save89
-
![Offline Delivery tam] = Save90
-
![Offline Delivery quad] = Save91
-
![No Wide Thru quad] = Save92
-
![No Wide Thru Tam] = Save93
-
![Special Pallets Due] = Save94
-
![Security Tape Due] = Save95
-
![Content Number] = Save96
-
![Plate Length] = Save97
-
![Number Wide Plates] = Save98
-
.Update
-
.Close
-
Set CurrentSet = Nothing
-
End With
-
MsgBox "record added with order number " + Combo970.Value
-
-
Combo960.Text = Combo970.Value
-
-
-
' So Now we have a new record in the table, its a matter of getting to it on the form
-
-
'Me.Requery
-
' DoCmd.GoToRecord acLast
-
End Sub
ok one more question about the combo box
i have two combo boxes how do i create a vba code to make combo970 to have the same ordernumber as combo960
NOTE: ive tried - Private Sub ComboBox1_Click()
-
ComboBox2.Value = ComboBox1.Text
-
End Sub
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Michael |
last post by:
Hi All,
I am working on my intranet reporting web site, by use of IIS5 + Office2000
+SQL2000.
Currently, the first step, I show user an ASP web-interface to collect user
input, keyword...
|
by: Matthew Louden |
last post by:
In ASP, if I have asppage.asp for GUI and aspprocess.asp for process
requests from database.
In asppage.asp code will be like:
<form action="aspprocess.asp" method="POST"> GUI CODE </form>
...
|
by: jxiang |
last post by:
I created a child form that is much bigger than the MDI form in VB.Net. I am
trying to capture the whole child form and save as an image or sent to
printer. I tried to use BitBlt to capture the...
|
by: danielboendergaard |
last post by:
Hey
Im making a homepage in php. I use a html form to put data into mysql
and i want to make some buttons which inserts user input values into a
textarea. I have used a button like this:
<input...
|
by: =?Utf-8?B?TG9zdEluTUQ=?= |
last post by:
Hi All,
I am trying to determine if the user clicked the "x" close button within the
controlbox of the form (top right corner - next to minimize and maximize
buttons).
I am using the...
|
by: parshupooja |
last post by:
Hi,
I am working in Asp.Net 2.0, SQL Server, C#.
I am trying to create a User Input form which has lots of fields such as :
salutation;
Firstname:
lastname:
address:
Zip:
Phone:
|
by: Cigar2011 |
last post by:
I have a MYSQL database set up. I also have a html form created. The
form requests' the users first and last names, address (with different
fields for town/state/zip), email and phone. I want to...
|
by: Abneo |
last post by:
Hi all,
I am very new to Javascript and I am in some need of some help. I am creating a site that has a madlib. I got the madlib code but now I want the results of the madlib to display in...
|
by: ekasII |
last post by:
I'm trying to capture text input by user to file,
password = wx.TextCtrl(self.panel_1,wx.ID_ANY,pos=(230,150),size=(200,20),style= wx.TE_PASSWORD)
l__password_file = <path\file.txt>...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
| |