New daily record number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a main form [LogDate] and a subform [LogDateSubform], Date is entered
once in the main form and then records are added to the subform. No problem
here.
Question: How can i set a textbox so records, in the subform, are numbered
starting from 1 every time a new day is entered? A date field is the linking
field between the forms.

Thank you for your help.
 
This example assigns the next number to a field name "Pos":

Private Sub Form_BeforeInsert(Cancel As Integer)
Dim strWhere As String

With Me.Parent![YourDateFieldOnMainFormHere]
If IsNull(.Value) Then
Cancel = True
MsgBox "Enter a date in the main form first."
Else
strWhere = "[YourSubformDateFieldHere] = " & _
Format(.Value, "\#mm\/dd\/yyyy\#")
Me.[Pos] = Nz(DMax("Pos", "YourSubformTable", strWhere), 0) + 1
End If
End If
End Sub
 
The receptionist must "log" each call that is transferred to a sales rep. At
any given time, her boss may ask her how many calls have been log total or
how many have been transferred to each sales rep.

I know she can just look at the navigation bar but our receptionist is not
very "computer-oriented"

David C. Holley said:
What is the specific *NEED* to have records numbered from 1 for each day?

Ricoy-Chicago said:
I have a main form [LogDate] and a subform [LogDateSubform], Date is entered
once in the main form and then records are added to the subform. No problem
here.
Question: How can i set a textbox so records, in the subform, are numbered
starting from 1 every time a new day is entered? A date field is the linking
field between the forms.

Thank you for your help.
 
Then create a query that Counts the records. Create a new query using
the query builder. Select VIEW>TOTALS. Then select 'COUNT' on one of the
fields.

Ricoy-Chicago said:
The receptionist must "log" each call that is transferred to a sales rep. At
any given time, her boss may ask her how many calls have been log total or
how many have been transferred to each sales rep.

I know she can just look at the navigation bar but our receptionist is not
very "computer-oriented"

:

What is the specific *NEED* to have records numbered from 1 for each day?

Ricoy-Chicago said:
I have a main form [LogDate] and a subform [LogDateSubform], Date is entered
once in the main form and then records are added to the subform. No problem
here.
Question: How can i set a textbox so records, in the subform, are numbered
starting from 1 every time a new day is entered? A date field is the linking
field between the forms.

Thank you for your help.
 
Back
Top