RE: Compile Error



StartNumber_A is a field in the table tbl_FormNumber_A. It is where the
batch numbers are heald. Starting number and stop number (ie...start
500...stop 499)

"NEC-2008" wrote:

I need to know what I'm doing wrong. I'm tring to get a form number to
count..1,2,3...ect and I keep getting a "Compile Error".
Can anybody help me out?

tbl_FormNumber_A
Field Name Data Type
StartNumber_A Number
StopNUmber_A Number

frm_FormNumber_A
StartNumber_A text box (this form used to enter
the batch
StopNumber_A text box numbers of the forms)

The code that I put in the "FormNumber" text box on the form itself is at
the beforeinsert location.
The Code:

Private Sub Form_BeforeInsert (Cancel As Interger)
Me![FormNumber_A] = Next _Start_Number_A ()
If Me.FormNumber_A = DLookup ("StopNumber_A",
"tbl_FormNumber_A") - 10 Then
MsgBox "The current batch numbers are about to run out"
End If
End Sub

This gives me a Compile Error of "Sub or Function Not Defined"
at .....Next_StartNumber_A ()

Can anyone help with this? Thanks in advance.





.



Relevant Pages

  • Re: Field Before Update property
    ... If you're using Nowas the DefaultValue, then my code won't work for your ... Private Sub Form_AfterUpdate ... > batch will be marked for deletion (it's actually marked for supression as ... it won't allow me change it the first time. ...
    (microsoft.public.access.forms)
  • RE: a "popup" form
    ... Keeping in mind that this will not work if the listbox has the Multi-Select ... "Pwyd" wrote: ... Private Sub lst_People_MouseUp(Button As Integer, Shift As Integer, _ ... DoCmd.OpenForm ("Earliest Date in Batch") ...
    (microsoft.public.access.formscoding)
  • RE: a "popup" form
    ... That particular argument opens the form as modal so ... Private Sub lst_People_MouseUp(Button As Integer, Shift As Integer, _ ... Keeping in mind that this will not work if the listbox has the Multi-Select ... DoCmd.OpenForm ("Earliest Date in Batch") ...
    (microsoft.public.access.formscoding)
  • RE: a "popup" form
    ... Keeping in mind that this will not work if the listbox has the Multi-Select ... "Pwyd" wrote: ... Private Sub lst_People_MouseUp(Button As Integer, Shift As Integer, _ ... DoCmd.OpenForm ("Earliest Date in Batch") ...
    (microsoft.public.access.formscoding)
  • RE: a "popup" form
    ... Dale it seems to be opening up to the same unrelated record each time -- Its ... since the purpose of the listbox is normally to select an item from ... Private Sub lst_People_MouseUp(Button As Integer, Shift As Integer, _ ... DoCmd.OpenForm ("Earliest Date in Batch") ...
    (microsoft.public.access.formscoding)

Loading