I have a data entry form for generating bar codes that asks for a Sample ID for cell A1 and the number of samples to be labeled in C1.
I am having trouble writing a VBA script that will autofill the column from A2 down to Ax where x = number of samples entered into C1. The bar codes are generated in the adjacent B column.
Any help would be greatly appreciated.
User Profile
Collapse
-
Autofill based on text box input
-
Is this combo box in the Form Header/Footer, or is it in the Detail Section? Have tried the ComboBox in both sections with the same results
You say this is a data entry form, does that mean you want to apply a similar value to a field in all of the new records in the instance that the form is used? Yes - When we create new samples we want the ComboBox value applied to all of them.
Thanks -
Using a Combo-Box with Data Entry Form
I have a data entry form that uses a control button to process multiple "samples" using
In the form I have a Combo Box...Code:Private Sub GenerateRecords_Click() Dim mn As Long Dim Rec As Long Rec = (Me.Text2 - Text1) + 1 For mn = 1 To CInt(Rec) DoCmd.GoToRecord , , acNewRec Me.VoucherNo = Me.AutoDate + mn Next mn End Sub
-
Recording Text Box value to Table
I have a data entry form with a text box that is formatted with "=Format(Date() ,"yymmdd") & Format([ID])" where ID = AutoNumber field in my table.
I am using the text box value to view/create new sample records as follows 140308001, 140308002... for samples entered on the same day.
Currently my table is only recording the Format(Date()," yymmdd") portion of the sample ID when I use...
No activity results to display
Show More
Leave a comment: