A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

New daily record number



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2005, 07:01 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default New daily record number

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.
  #2  
Old December 3rd, 2005, 05:49 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default New daily record number

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

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Ricoy-Chicago" wrote in message
...
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.



  #3  
Old December 3rd, 2005, 01:03 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default New daily record number

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

Ricoy-Chicago wrote:
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.

  #4  
Old December 4th, 2005, 12:56 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default New daily record number

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" wrote:

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

Ricoy-Chicago wrote:
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.


  #5  
Old December 4th, 2005, 02:25 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default New daily record number

Then create a query that Counts the records. Create a new query using
the query builder. Select VIEWTOTALS. Then select 'COUNT' on one of the
fields.

Ricoy-Chicago wrote:
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" wrote:


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

Ricoy-Chicago wrote:

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.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to append flat file table to two tables Victoriya F via AccessMonster.com Running & Setting Up Queries 11 September 26th, 2005 05:30 PM
strategy for data entry in multiple tables LAF Using Forms 18 April 25th, 2005 04:04 AM
help needed jkendrick75 Running & Setting Up Queries 19 March 17th, 2005 02:37 PM
Prevent Blank Records being written. Need Help. Robert Nusz @ DPS Using Forms 4 December 29th, 2004 05:15 PM
Form Doesn't Go To New Record Steve New Users 15 May 16th, 2004 04:33 PM


All times are GMT +1. The time now is 01:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.