Hello everyone
Im trying to learn more about Access Database and I'm an beginner so please forgive me.
I've made a database for storing orders and print labels thorugh a report for every order I put to organize the little shoe shop.
Usually the order is made creating a table with custom fields.
Table1:
Art - Model - Color - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42
I add fields thorugh a mask i've made and the output is made on the table for single order.
ex.
DataLav - MB040 - Stiletto Shoes - Black - 35[1] 36[2] 37[1] 38[1] 39[0] 40[1] 41[0] 42[0]
To output print labels I made a report with the size of template of the printing sheet for my printer.
I should output print labels this way once the data of single order field is called (DataLav)
MB040 - Stiletto Shoes - Black N. 35
MB040 - Stiletto Shoes - Black N. 36
MB040 - Stiletto Shoes - Black N. 36
MB040 - Stiletto Shoes - Black N. 37
MB040 - Stiletto Shoes - Black N. 38
MB040 - Stiletto Shoes - Black N. 40
I actually able to get the data for Articles, model and color as are stastic field and output correctly for the date I put in report.
But how i can get the dynamical field for numbers? How i can print on the report the same label for the quantity indicated?
Actually my out put is:
MB040 - Stiletto Shoes - Black N. //
MB040 - Stiletto Shoes - Black N. //
MB040 - Stiletto Shoes - Black N. //
MB040 - Stiletto Shoes - Black N. //
I tried something with VBA doing a Do while
"Size" is the label name of the report field "35>42"
Actually I need put this macro on the report opening to generate the correct output.
But this dont work, could you help me?
I will appreciate
thank you
Im trying to learn more about Access Database and I'm an beginner so please forgive me.
I've made a database for storing orders and print labels thorugh a report for every order I put to organize the little shoe shop.
Usually the order is made creating a table with custom fields.
Table1:
Art - Model - Color - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42
I add fields thorugh a mask i've made and the output is made on the table for single order.
ex.
DataLav - MB040 - Stiletto Shoes - Black - 35[1] 36[2] 37[1] 38[1] 39[0] 40[1] 41[0] 42[0]
To output print labels I made a report with the size of template of the printing sheet for my printer.
I should output print labels this way once the data of single order field is called (DataLav)
MB040 - Stiletto Shoes - Black N. 35
MB040 - Stiletto Shoes - Black N. 36
MB040 - Stiletto Shoes - Black N. 36
MB040 - Stiletto Shoes - Black N. 37
MB040 - Stiletto Shoes - Black N. 38
MB040 - Stiletto Shoes - Black N. 40
I actually able to get the data for Articles, model and color as are stastic field and output correctly for the date I put in report.
But how i can get the dynamical field for numbers? How i can print on the report the same label for the quantity indicated?
Actually my out put is:
MB040 - Stiletto Shoes - Black N. //
MB040 - Stiletto Shoes - Black N. //
MB040 - Stiletto Shoes - Black N. //
MB040 - Stiletto Shoes - Black N. //
I tried something with VBA doing a Do while
VBA Code:
Private Sub Size_Click()
'On Error GoTo ErrHandler
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim rstFiltered As DAO.Recordset
Dim number As String
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset (_ "SELECT 35, 36, 37, 38, 39, 40, 41, 42 FROM Table1 WHERE (((Table1.[DataLav])=[Add your date:]));")
If rst.EOF And rst.BOF Then
MsgBox "There are no records in the recordset."
Else
Do While Not rst.EOF
number = rst!
For Each rst In .Fields
Me.Size.Value = rst.Value
Else
MsgBox "There are no field."
End If
rst.Close
Set rst = Nothing
End Sub
"Size" is the label name of the report field "35>42"
Actually I need put this macro on the report opening to generate the correct output.
But this dont work, could you help me?
I will appreciate
thank you