Required field added to existing records

Hello,

I have a existing table with data already created.  I need to add a field to 
this table that is going to be required from now on. When I open the form to 
update the record it allows me to add the information to the required field. 
But when I tested the record to see if it would flag me on the required field 
by closing it, it closes without flaging me to enter the information in the 
required field.  Can I update existing records on a form for a newly added 
required field and have it flag me if the data is not enter on a form.

Thanks,

Robin
0
Utf
5/7/2007 6:08:01 PM
access.forms 6864 articles. 2 followers. Follow

11 Replies
1113 Views

Similar Articles

[PageSpeed] 32

You need to add the field to the table first.
Open table in design view
Add new field and set required property to "Yes"
save and close table

Open form in design view
Add new filed from table
save form


"Robin" wrote:

> Hello,
> 
> I have a existing table with data already created.  I need to add a field to 
> this table that is going to be required from now on. When I open the form to 
> update the record it allows me to add the information to the required field. 
> But when I tested the record to see if it would flag me on the required field 
> by closing it, it closes without flaging me to enter the information in the 
> required field.  Can I update existing records on a form for a newly added 
> required field and have it flag me if the data is not enter on a form.
> 
> Thanks,
> 
> Robin
0
Utf
5/7/2007 7:40:00 PM
Robin,

I don't think you can flag the new field as "required" while there are 
existing records in the table that don't have it filled. I don't 
remember, to be honest, but I seem to recall that.

So what you might want to do is run an update query to add *something* 
to the field on all existing records, and then try it.

The other thing you might consider not using the Required setting on the 
field, and instead write some code on the form that checks for a value 
in that field before updating the record, and doesn't allow you to move 
on if it's empty.

grep


Robin wrote:
> Hello,
> 
> I have a existing table with data already created.  I need to add a field to 
> this table that is going to be required from now on. When I open the form to 
> update the record it allows me to add the information to the required field. 
> But when I tested the record to see if it would flag me on the required field 
> by closing it, it closes without flaging me to enter the information in the 
> required field.  Can I update existing records on a form for a newly added 
> required field and have it flag me if the data is not enter on a form.
> 
> Thanks,
> 
> Robin
0
grep
5/7/2007 8:17:18 PM
The BeforeUpdate event only fires before Access is about to update a record.

Sounds as though you also need code in the form's Current event. along the 
lines of:

If Me.NewRecord = False Then
  If IsNull(Me.Verification) Then
    MsgBox "You must add data here"
    Me.Verification.SetFocus
  End If
End If

The reason for checking the form's NewRecord property is to ensure that it 
doesn't fire when you move to a new record.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Robin" <Robin@discussions.microsoft.com> wrote in message 
news:F2C9D37A-269D-43F5-B61D-5995DA1B4138@microsoft.com...
> Hell Chris,
>
> The field was originally added to the table and set up as a required 
> field.
> I then added the field to the forms but when I open the form with the
> existing data that comes up the newly opened field does not flag me if 
> there
> is no data.  Is it because of the existing data?  When I add a new record 
> the
> field works fine.  It flags me if there is no data.  I am working with a
> table not a query.  I have also added code to the forms field properties
> under the "Before update"  which reads as:
>
> Private Sub Verification_BeforeUpdate(Cancel As Integer)
>
> If IsNull(Me.Verification) Then
> MsgBox "You must add data here"
> Me.Verification.SetFocus
> Cancel = True
> End If
> End Sub
>
> What else can I do to control this field so that it will flag the user to
> put in information before closing.  The problem is where the table already
> has existing data.  If adding new records it works fine, but not with old
> data.
>
> Thanks,
>
> Robin
>
>
>
>
> "Chris Reveille" wrote:
>
>> You need to add the field to the table first.
>> Open table in design view
>> Add new field and set required property to "Yes"
>> save and close table
>>
>> Open form in design view
>> Add new filed from table
>> save form
>>
>>
>> "Robin" wrote:
>>
>> > Hello,
>> >
>> > I have a existing table with data already created.  I need to add a 
>> > field to
>> > this table that is going to be required from now on. When I open the 
>> > form to
>> > update the record it allows me to add the information to the required 
>> > field.
>> > But when I tested the record to see if it would flag me on the required 
>> > field
>> > by closing it, it closes without flaging me to enter the information in 
>> > the
>> > required field.  Can I update existing records on a form for a newly 
>> > added
>> > required field and have it flag me if the data is not enter on a form.
>> >
>> > Thanks,
>> >
>> > Robin 


0
Douglas
5/9/2007 4:11:42 PM
Hello;

I added the code that you suggested to the "On Current" properties of the 
form. Which is:  

Private Sub Form_Current()
If Me.NewRecord = False Then
  If IsNull(Me.Verification) Then
    MsgBox "You must add data here"
    Me.Verification.SetFocus
  End If
End If
End Sub


 I am getting a compile error msg (461).  I was hoping that you could guide 
in on what to do.

Here is the msg that I receive when I open the form:

Method or data member not found : compile error (461)

Thanks,

Robin

"Douglas J. Steele" wrote:

> The BeforeUpdate event only fires before Access is about to update a record.
> 
> Sounds as though you also need code in the form's Current event. along the 
> lines of:
> 
> If Me.NewRecord = False Then
>   If IsNull(Me.Verification) Then
>     MsgBox "You must add data here"
>     Me.Verification.SetFocus
>   End If
> End If
> 
> The reason for checking the form's NewRecord property is to ensure that it 
> doesn't fire when you move to a new record.
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "Robin" <Robin@discussions.microsoft.com> wrote in message 
> news:F2C9D37A-269D-43F5-B61D-5995DA1B4138@microsoft.com...
> > Hell Chris,
> >
> > The field was originally added to the table and set up as a required 
> > field.
> > I then added the field to the forms but when I open the form with the
> > existing data that comes up the newly opened field does not flag me if 
> > there
> > is no data.  Is it because of the existing data?  When I add a new record 
> > the
> > field works fine.  It flags me if there is no data.  I am working with a
> > table not a query.  I have also added code to the forms field properties
> > under the "Before update"  which reads as:
> >
> > Private Sub Verification_BeforeUpdate(Cancel As Integer)
> >
> > If IsNull(Me.Verification) Then
> > MsgBox "You must add data here"
> > Me.Verification.SetFocus
> > Cancel = True
> > End If
> > End Sub
> >
> > What else can I do to control this field so that it will flag the user to
> > put in information before closing.  The problem is where the table already
> > has existing data.  If adding new records it works fine, but not with old
> > data.
> >
> > Thanks,
> >
> > Robin
> >
> >
> >
> >
> > "Chris Reveille" wrote:
> >
> >> You need to add the field to the table first.
> >> Open table in design view
> >> Add new field and set required property to "Yes"
> >> save and close table
> >>
> >> Open form in design view
> >> Add new filed from table
> >> save form
> >>
> >>
> >> "Robin" wrote:
> >>
> >> > Hello,
> >> >
> >> > I have a existing table with data already created.  I need to add a 
> >> > field to
> >> > this table that is going to be required from now on. When I open the 
> >> > form to
> >> > update the record it allows me to add the information to the required 
> >> > field.
> >> > But when I tested the record to see if it would flag me on the required 
> >> > field
> >> > by closing it, it closes without flaging me to enter the information in 
> >> > the
> >> > required field.  Can I update existing records on a form for a newly 
> >> > added
> >> > required field and have it flag me if the data is not enter on a form.
> >> >
> >> > Thanks,
> >> >
> >> > Robin 
> 
> 
> 
0
Utf
5/9/2007 6:29:01 PM
See whether using Me!Verification instead of Me.Verification makes a 
difference.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Robin" <Robin@discussions.microsoft.com> wrote in message 
news:EFCBFFA7-6FC1-461B-9889-06E40B148058@microsoft.com...
> Hello;
>
> I added the code that you suggested to the "On Current" properties of the
> form. Which is:
>
> Private Sub Form_Current()
> If Me.NewRecord = False Then
>  If IsNull(Me.Verification) Then
>    MsgBox "You must add data here"
>    Me.Verification.SetFocus
>  End If
> End If
> End Sub
>
>
> I am getting a compile error msg (461).  I was hoping that you could guide
> in on what to do.
>
> Here is the msg that I receive when I open the form:
>
> Method or data member not found : compile error (461)
>
> Thanks,
>
> Robin
>
> "Douglas J. Steele" wrote:
>
>> The BeforeUpdate event only fires before Access is about to update a 
>> record.
>>
>> Sounds as though you also need code in the form's Current event. along 
>> the
>> lines of:
>>
>> If Me.NewRecord = False Then
>>   If IsNull(Me.Verification) Then
>>     MsgBox "You must add data here"
>>     Me.Verification.SetFocus
>>   End If
>> End If
>>
>> The reason for checking the form's NewRecord property is to ensure that 
>> it
>> doesn't fire when you move to a new record.
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> news:F2C9D37A-269D-43F5-B61D-5995DA1B4138@microsoft.com...
>> > Hell Chris,
>> >
>> > The field was originally added to the table and set up as a required
>> > field.
>> > I then added the field to the forms but when I open the form with the
>> > existing data that comes up the newly opened field does not flag me if
>> > there
>> > is no data.  Is it because of the existing data?  When I add a new 
>> > record
>> > the
>> > field works fine.  It flags me if there is no data.  I am working with 
>> > a
>> > table not a query.  I have also added code to the forms field 
>> > properties
>> > under the "Before update"  which reads as:
>> >
>> > Private Sub Verification_BeforeUpdate(Cancel As Integer)
>> >
>> > If IsNull(Me.Verification) Then
>> > MsgBox "You must add data here"
>> > Me.Verification.SetFocus
>> > Cancel = True
>> > End If
>> > End Sub
>> >
>> > What else can I do to control this field so that it will flag the user 
>> > to
>> > put in information before closing.  The problem is where the table 
>> > already
>> > has existing data.  If adding new records it works fine, but not with 
>> > old
>> > data.
>> >
>> > Thanks,
>> >
>> > Robin
>> >
>> >
>> >
>> >
>> > "Chris Reveille" wrote:
>> >
>> >> You need to add the field to the table first.
>> >> Open table in design view
>> >> Add new field and set required property to "Yes"
>> >> save and close table
>> >>
>> >> Open form in design view
>> >> Add new filed from table
>> >> save form
>> >>
>> >>
>> >> "Robin" wrote:
>> >>
>> >> > Hello,
>> >> >
>> >> > I have a existing table with data already created.  I need to add a
>> >> > field to
>> >> > this table that is going to be required from now on. When I open the
>> >> > form to
>> >> > update the record it allows me to add the information to the 
>> >> > required
>> >> > field.
>> >> > But when I tested the record to see if it would flag me on the 
>> >> > required
>> >> > field
>> >> > by closing it, it closes without flaging me to enter the information 
>> >> > in
>> >> > the
>> >> > required field.  Can I update existing records on a form for a newly
>> >> > added
>> >> > required field and have it flag me if the data is not enter on a 
>> >> > form.
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Robin
>>
>>
>> 


0
Douglas
5/9/2007 6:57:22 PM
I am still not have any success with the change.  Any other suggestions?

Thanks,

Robin

"Douglas J. Steele" wrote:

> See whether using Me!Verification instead of Me.Verification makes a 
> difference.
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "Robin" <Robin@discussions.microsoft.com> wrote in message 
> news:EFCBFFA7-6FC1-461B-9889-06E40B148058@microsoft.com...
> > Hello;
> >
> > I added the code that you suggested to the "On Current" properties of the
> > form. Which is:
> >
> > Private Sub Form_Current()
> > If Me.NewRecord = False Then
> >  If IsNull(Me.Verification) Then
> >    MsgBox "You must add data here"
> >    Me.Verification.SetFocus
> >  End If
> > End If
> > End Sub
> >
> >
> > I am getting a compile error msg (461).  I was hoping that you could guide
> > in on what to do.
> >
> > Here is the msg that I receive when I open the form:
> >
> > Method or data member not found : compile error (461)
> >
> > Thanks,
> >
> > Robin
> >
> > "Douglas J. Steele" wrote:
> >
> >> The BeforeUpdate event only fires before Access is about to update a 
> >> record.
> >>
> >> Sounds as though you also need code in the form's Current event. along 
> >> the
> >> lines of:
> >>
> >> If Me.NewRecord = False Then
> >>   If IsNull(Me.Verification) Then
> >>     MsgBox "You must add data here"
> >>     Me.Verification.SetFocus
> >>   End If
> >> End If
> >>
> >> The reason for checking the form's NewRecord property is to ensure that 
> >> it
> >> doesn't fire when you move to a new record.
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
> >> news:F2C9D37A-269D-43F5-B61D-5995DA1B4138@microsoft.com...
> >> > Hell Chris,
> >> >
> >> > The field was originally added to the table and set up as a required
> >> > field.
> >> > I then added the field to the forms but when I open the form with the
> >> > existing data that comes up the newly opened field does not flag me if
> >> > there
> >> > is no data.  Is it because of the existing data?  When I add a new 
> >> > record
> >> > the
> >> > field works fine.  It flags me if there is no data.  I am working with 
> >> > a
> >> > table not a query.  I have also added code to the forms field 
> >> > properties
> >> > under the "Before update"  which reads as:
> >> >
> >> > Private Sub Verification_BeforeUpdate(Cancel As Integer)
> >> >
> >> > If IsNull(Me.Verification) Then
> >> > MsgBox "You must add data here"
> >> > Me.Verification.SetFocus
> >> > Cancel = True
> >> > End If
> >> > End Sub
> >> >
> >> > What else can I do to control this field so that it will flag the user 
> >> > to
> >> > put in information before closing.  The problem is where the table 
> >> > already
> >> > has existing data.  If adding new records it works fine, but not with 
> >> > old
> >> > data.
> >> >
> >> > Thanks,
> >> >
> >> > Robin
> >> >
> >> >
> >> >
> >> >
> >> > "Chris Reveille" wrote:
> >> >
> >> >> You need to add the field to the table first.
> >> >> Open table in design view
> >> >> Add new field and set required property to "Yes"
> >> >> save and close table
> >> >>
> >> >> Open form in design view
> >> >> Add new filed from table
> >> >> save form
> >> >>
> >> >>
> >> >> "Robin" wrote:
> >> >>
> >> >> > Hello,
> >> >> >
> >> >> > I have a existing table with data already created.  I need to add a
> >> >> > field to
> >> >> > this table that is going to be required from now on. When I open the
> >> >> > form to
> >> >> > update the record it allows me to add the information to the 
> >> >> > required
> >> >> > field.
> >> >> > But when I tested the record to see if it would flag me on the 
> >> >> > required
> >> >> > field
> >> >> > by closing it, it closes without flaging me to enter the information 
> >> >> > in
> >> >> > the
> >> >> > required field.  Can I update existing records on a form for a newly
> >> >> > added
> >> >> > required field and have it flag me if the data is not enter on a 
> >> >> > form.
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Robin
> >>
> >>
> >> 
> 
> 
> 
0
Utf
5/9/2007 7:44:01 PM
On which line is the error happening?

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Robin" <Robin@discussions.microsoft.com> wrote in message 
news:D0402AD5-57D3-4DCE-A491-A7DF990FC316@microsoft.com...
>I am still not have any success with the change.  Any other suggestions?
>
> Thanks,
>
> Robin
>
> "Douglas J. Steele" wrote:
>
>> See whether using Me!Verification instead of Me.Verification makes a
>> difference.
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> news:EFCBFFA7-6FC1-461B-9889-06E40B148058@microsoft.com...
>> > Hello;
>> >
>> > I added the code that you suggested to the "On Current" properties of 
>> > the
>> > form. Which is:
>> >
>> > Private Sub Form_Current()
>> > If Me.NewRecord = False Then
>> >  If IsNull(Me.Verification) Then
>> >    MsgBox "You must add data here"
>> >    Me.Verification.SetFocus
>> >  End If
>> > End If
>> > End Sub
>> >
>> >
>> > I am getting a compile error msg (461).  I was hoping that you could 
>> > guide
>> > in on what to do.
>> >
>> > Here is the msg that I receive when I open the form:
>> >
>> > Method or data member not found : compile error (461)
>> >
>> > Thanks,
>> >
>> > Robin
>> >
>> > "Douglas J. Steele" wrote:
>> >
>> >> The BeforeUpdate event only fires before Access is about to update a
>> >> record.
>> >>
>> >> Sounds as though you also need code in the form's Current event. along
>> >> the
>> >> lines of:
>> >>
>> >> If Me.NewRecord = False Then
>> >>   If IsNull(Me.Verification) Then
>> >>     MsgBox "You must add data here"
>> >>     Me.Verification.SetFocus
>> >>   End If
>> >> End If
>> >>
>> >> The reason for checking the form's NewRecord property is to ensure 
>> >> that
>> >> it
>> >> doesn't fire when you move to a new record.
>> >>
>> >> -- 
>> >> Doug Steele, Microsoft Access MVP
>> >> http://I.Am/DougSteele
>> >> (no e-mails, please!)
>> >>
>> >>
>> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> >> news:F2C9D37A-269D-43F5-B61D-5995DA1B4138@microsoft.com...
>> >> > Hell Chris,
>> >> >
>> >> > The field was originally added to the table and set up as a required
>> >> > field.
>> >> > I then added the field to the forms but when I open the form with 
>> >> > the
>> >> > existing data that comes up the newly opened field does not flag me 
>> >> > if
>> >> > there
>> >> > is no data.  Is it because of the existing data?  When I add a new
>> >> > record
>> >> > the
>> >> > field works fine.  It flags me if there is no data.  I am working 
>> >> > with
>> >> > a
>> >> > table not a query.  I have also added code to the forms field
>> >> > properties
>> >> > under the "Before update"  which reads as:
>> >> >
>> >> > Private Sub Verification_BeforeUpdate(Cancel As Integer)
>> >> >
>> >> > If IsNull(Me.Verification) Then
>> >> > MsgBox "You must add data here"
>> >> > Me.Verification.SetFocus
>> >> > Cancel = True
>> >> > End If
>> >> > End Sub
>> >> >
>> >> > What else can I do to control this field so that it will flag the 
>> >> > user
>> >> > to
>> >> > put in information before closing.  The problem is where the table
>> >> > already
>> >> > has existing data.  If adding new records it works fine, but not 
>> >> > with
>> >> > old
>> >> > data.
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Robin
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > "Chris Reveille" wrote:
>> >> >
>> >> >> You need to add the field to the table first.
>> >> >> Open table in design view
>> >> >> Add new field and set required property to "Yes"
>> >> >> save and close table
>> >> >>
>> >> >> Open form in design view
>> >> >> Add new filed from table
>> >> >> save form
>> >> >>
>> >> >>
>> >> >> "Robin" wrote:
>> >> >>
>> >> >> > Hello,
>> >> >> >
>> >> >> > I have a existing table with data already created.  I need to add 
>> >> >> > a
>> >> >> > field to
>> >> >> > this table that is going to be required from now on. When I open 
>> >> >> > the
>> >> >> > form to
>> >> >> > update the record it allows me to add the information to the
>> >> >> > required
>> >> >> > field.
>> >> >> > But when I tested the record to see if it would flag me on the
>> >> >> > required
>> >> >> > field
>> >> >> > by closing it, it closes without flaging me to enter the 
>> >> >> > information
>> >> >> > in
>> >> >> > the
>> >> >> > required field.  Can I update existing records on a form for a 
>> >> >> > newly
>> >> >> > added
>> >> >> > required field and have it flag me if the data is not enter on a
>> >> >> > form.
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Robin
>> >>
>> >>
>> >>
>>
>>
>> 


0
Douglas
5/9/2007 9:19:16 PM
Hello,

Here is the error message that I receive when I open the form.

The expression on current you entered as the event property setting produced 
the following error:  Procedure declaration does not match description of 
event or procedure having the same name.

Code used on the Before update:

Private Sub Form_BeforeUpdate()
If IsNull(Me.Verification) Then

MsgBox "You must add data here"

Me.Verification.SetFocus

Cancel = True

End If
End Sub
*********************************************
Code used on the On current:

Private Sub Form_Current()
If Me.NewRecord = False Then
  If IsNull(Me.Verification) Then
    MsgBox "You must add data here"
    Me!Verification.SetFocus
  End If
End If
End Sub

Thanks,

Robin
"Douglas J. Steele" wrote:

> On which line is the error happening?
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
> 
> 
> "Robin" <Robin@discussions.microsoft.com> wrote in message 
> news:D0402AD5-57D3-4DCE-A491-A7DF990FC316@microsoft.com...
> >I am still not have any success with the change.  Any other suggestions?
> >
> > Thanks,
> >
> > Robin
> >
> > "Douglas J. Steele" wrote:
> >
> >> See whether using Me!Verification instead of Me.Verification makes a
> >> difference.
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
> >> news:EFCBFFA7-6FC1-461B-9889-06E40B148058@microsoft.com...
> >> > Hello;
> >> >
> >> > I added the code that you suggested to the "On Current" properties of 
> >> > the
> >> > form. Which is:
> >> >
> >> > Private Sub Form_Current()
> >> > If Me.NewRecord = False Then
> >> >  If IsNull(Me.Verification) Then
> >> >    MsgBox "You must add data here"
> >> >    Me.Verification.SetFocus
> >> >  End If
> >> > End If
> >> > End Sub
> >> >
> >> >
> >> > I am getting a compile error msg (461).  I was hoping that you could 
> >> > guide
> >> > in on what to do.
> >> >
> >> > Here is the msg that I receive when I open the form:
> >> >
> >> > Method or data member not found : compile error (461)
> >> >
> >> > Thanks,
> >> >
> >> > Robin
> >> >
> >> > "Douglas J. Steele" wrote:
> >> >
> >> >> The BeforeUpdate event only fires before Access is about to update a
> >> >> record.
> >> >>
> >> >> Sounds as though you also need code in the form's Current event. along
> >> >> the
> >> >> lines of:
> >> >>
> >> >> If Me.NewRecord = False Then
> >> >>   If IsNull(Me.Verification) Then
> >> >>     MsgBox "You must add data here"
> >> >>     Me.Verification.SetFocus
> >> >>   End If
> >> >> End If
> >> >>
> >> >> The reason for checking the form's NewRecord property is to ensure 
> >> >> that
> >> >> it
> >> >> doesn't fire when you move to a new record.
> >> >>
> >> >> -- 
> >> >> Doug Steele, Microsoft Access MVP
> >> >> http://I.Am/DougSteele
> >> >> (no e-mails, please!)
> >> >>
> >> >>
> >> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
> >> >> news:F2C9D37A-269D-43F5-B61D-5995DA1B4138@microsoft.com...
> >> >> > Hell Chris,
> >> >> >
> >> >> > The field was originally added to the table and set up as a required
> >> >> > field.
> >> >> > I then added the field to the forms but when I open the form with 
> >> >> > the
> >> >> > existing data that comes up the newly opened field does not flag me 
> >> >> > if
> >> >> > there
> >> >> > is no data.  Is it because of the existing data?  When I add a new
> >> >> > record
> >> >> > the
> >> >> > field works fine.  It flags me if there is no data.  I am working 
> >> >> > with
> >> >> > a
> >> >> > table not a query.  I have also added code to the forms field
> >> >> > properties
> >> >> > under the "Before update"  which reads as:
> >> >> >
> >> >> > Private Sub Verification_BeforeUpdate(Cancel As Integer)
> >> >> >
> >> >> > If IsNull(Me.Verification) Then
> >> >> > MsgBox "You must add data here"
> >> >> > Me.Verification.SetFocus
> >> >> > Cancel = True
> >> >> > End If
> >> >> > End Sub
> >> >> >
> >> >> > What else can I do to control this field so that it will flag the 
> >> >> > user
> >> >> > to
> >> >> > put in information before closing.  The problem is where the table
> >> >> > already
> >> >> > has existing data.  If adding new records it works fine, but not 
> >> >> > with
> >> >> > old
> >> >> > data.
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Robin
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > "Chris Reveille" wrote:
> >> >> >
> >> >> >> You need to add the field to the table first.
> >> >> >> Open table in design view
> >> >> >> Add new field and set required property to "Yes"
> >> >> >> save and close table
> >> >> >>
> >> >> >> Open form in design view
> >> >> >> Add new filed from table
> >> >> >> save form
> >> >> >>
> >> >> >>
> >> >> >> "Robin" wrote:
> >> >> >>
> >> >> >> > Hello,
> >> >> >> >
> >> >> >> > I have a existing table with data already created.  I need to add 
> >> >> >> > a
> >> >> >> > field to
> >> >> >> > this table that is going to be required from now on. When I open 
> >> >> >> > the
> >> >> >> > form to
> >> >> >> > update the record it allows me to add the information to the
> >> >> >> > required
> >> >> >> > field.
> >> >> >> > But when I tested the record to see if it would flag me on the
> >> >> >> > required
> >> >> >> > field
> >> >> >> > by closing it, it closes without flaging me to enter the 
> >> >> >> > information
> >> >> >> > in
> >> >> >> > the
> >> >> >> > required field.  Can I update existing records on a form for a 
> >> >> >> > newly
> >> >> >> > added
> >> >> >> > required field and have it flag me if the data is not enter on a
> >> >> >> > form.
> >> >> >> >
> >> >> >> > Thanks,
> >> >> >> >
> >> >> >> > Robin
> >> >>
> >> >>
> >> >>
> >>
> >>
> >> 
> 
> 
> 
0
Utf
5/11/2007 12:51:03 PM
The declaration for Form_BeforeUpdate is incorrect.

It's supposed to be

Private Sub Form_BeforeUpdate(Cancel As Integer)

I suspect you must have typed that yourself, as opposed to letting Access 
creating the declaration (and End Sub) for you.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Robin" <Robin@discussions.microsoft.com> wrote in message 
news:4B9F1099-4398-4404-9AAA-E0FB5B1A1716@microsoft.com...
> Hello,
>
> Here is the error message that I receive when I open the form.
>
> The expression on current you entered as the event property setting 
> produced
> the following error:  Procedure declaration does not match description of
> event or procedure having the same name.
>
> Code used on the Before update:
>
> Private Sub Form_BeforeUpdate()
> If IsNull(Me.Verification) Then
>
> MsgBox "You must add data here"
>
> Me.Verification.SetFocus
>
> Cancel = True
>
> End If
> End Sub
> *********************************************
> Code used on the On current:
>
> Private Sub Form_Current()
> If Me.NewRecord = False Then
>  If IsNull(Me.Verification) Then
>    MsgBox "You must add data here"
>    Me!Verification.SetFocus
>  End If
> End If
> End Sub
>
> Thanks,
>
> Robin
> "Douglas J. Steele" wrote:
>
>> On which line is the error happening?
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> news:D0402AD5-57D3-4DCE-A491-A7DF990FC316@microsoft.com...
>> >I am still not have any success with the change.  Any other suggestions?
>> >
>> > Thanks,
>> >
>> > Robin
>> >
>> > "Douglas J. Steele" wrote:
>> >
>> >> See whether using Me!Verification instead of Me.Verification makes a
>> >> difference.
>> >>
>> >> -- 
>> >> Doug Steele, Microsoft Access MVP
>> >> http://I.Am/DougSteele
>> >> (no e-mails, please!)
>> >>
>> >>
>> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> >> news:EFCBFFA7-6FC1-461B-9889-06E40B148058@microsoft.com...
>> >> > Hello;
>> >> >
>> >> > I added the code that you suggested to the "On Current" properties 
>> >> > of
>> >> > the
>> >> > form. Which is:
>> >> >
>> >> > Private Sub Form_Current()
>> >> > If Me.NewRecord = False Then
>> >> >  If IsNull(Me.Verification) Then
>> >> >    MsgBox "You must add data here"
>> >> >    Me.Verification.SetFocus
>> >> >  End If
>> >> > End If
>> >> > End Sub
>> >> >
>> >> >
>> >> > I am getting a compile error msg (461).  I was hoping that you could
>> >> > guide
>> >> > in on what to do.
>> >> >
>> >> > Here is the msg that I receive when I open the form:
>> >> >
>> >> > Method or data member not found : compile error (461)
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Robin
>> >> >
>> >> > "Douglas J. Steele" wrote:
>> >> >
>> >> >> The BeforeUpdate event only fires before Access is about to update 
>> >> >> a
>> >> >> record.
>> >> >>
>> >> >> Sounds as though you also need code in the form's Current event. 
>> >> >> along
>> >> >> the
>> >> >> lines of:
>> >> >>
>> >> >> If Me.NewRecord = False Then
>> >> >>   If IsNull(Me.Verification) Then
>> >> >>     MsgBox "You must add data here"
>> >> >>     Me.Verification.SetFocus
>> >> >>   End If
>> >> >> End If
>> >> >>
>> >> >> The reason for checking the form's NewRecord property is to ensure
>> >> >> that
>> >> >> it
>> >> >> doesn't fire when you move to a new record.
>> >> >>
>> >> >> -- 
>> >> >> Doug Steele, Microsoft Access MVP
>> >> >> http://I.Am/DougSteele
>> >> >> (no e-mails, please!)
>> >> >>
>> >> >>
>> >> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> >> >> news:F2C9D37A-269D-43F5-B61D-5995DA1B4138@microsoft.com...
>> >> >> > Hell Chris,
>> >> >> >
>> >> >> > The field was originally added to the table and set up as a 
>> >> >> > required
>> >> >> > field.
>> >> >> > I then added the field to the forms but when I open the form with
>> >> >> > the
>> >> >> > existing data that comes up the newly opened field does not flag 
>> >> >> > me
>> >> >> > if
>> >> >> > there
>> >> >> > is no data.  Is it because of the existing data?  When I add a 
>> >> >> > new
>> >> >> > record
>> >> >> > the
>> >> >> > field works fine.  It flags me if there is no data.  I am working
>> >> >> > with
>> >> >> > a
>> >> >> > table not a query.  I have also added code to the forms field
>> >> >> > properties
>> >> >> > under the "Before update"  which reads as:
>> >> >> >
>> >> >> > Private Sub Verification_BeforeUpdate(Cancel As Integer)
>> >> >> >
>> >> >> > If IsNull(Me.Verification) Then
>> >> >> > MsgBox "You must add data here"
>> >> >> > Me.Verification.SetFocus
>> >> >> > Cancel = True
>> >> >> > End If
>> >> >> > End Sub
>> >> >> >
>> >> >> > What else can I do to control this field so that it will flag the
>> >> >> > user
>> >> >> > to
>> >> >> > put in information before closing.  The problem is where the 
>> >> >> > table
>> >> >> > already
>> >> >> > has existing data.  If adding new records it works fine, but not
>> >> >> > with
>> >> >> > old
>> >> >> > data.
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Robin
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > "Chris Reveille" wrote:
>> >> >> >
>> >> >> >> You need to add the field to the table first.
>> >> >> >> Open table in design view
>> >> >> >> Add new field and set required property to "Yes"
>> >> >> >> save and close table
>> >> >> >>
>> >> >> >> Open form in design view
>> >> >> >> Add new filed from table
>> >> >> >> save form
>> >> >> >>
>> >> >> >>
>> >> >> >> "Robin" wrote:
>> >> >> >>
>> >> >> >> > Hello,
>> >> >> >> >
>> >> >> >> > I have a existing table with data already created.  I need to 
>> >> >> >> > add
>> >> >> >> > a
>> >> >> >> > field to
>> >> >> >> > this table that is going to be required from now on. When I 
>> >> >> >> > open
>> >> >> >> > the
>> >> >> >> > form to
>> >> >> >> > update the record it allows me to add the information to the
>> >> >> >> > required
>> >> >> >> > field.
>> >> >> >> > But when I tested the record to see if it would flag me on the
>> >> >> >> > required
>> >> >> >> > field
>> >> >> >> > by closing it, it closes without flaging me to enter the
>> >> >> >> > information
>> >> >> >> > in
>> >> >> >> > the
>> >> >> >> > required field.  Can I update existing records on a form for a
>> >> >> >> > newly
>> >> >> >> > added
>> >> >> >> > required field and have it flag me if the data is not enter on 
>> >> >> >> > a
>> >> >> >> > form.
>> >> >> >> >
>> >> >> >> > Thanks,
>> >> >> >> >
>> >> >> >> > Robin
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>> 


0
Douglas
5/12/2007 11:51:06 AM
Hello,

I copied the the Before Update from another user on this forum. I am glad 
you caught this mistake.  I made the change below that you suggested to the 
berupdate and now when I open the form, it opens with "you must add data 
here" and the error message reads "Run-time error '438':  Object doesn't 
support this property or method"  I then click the Debug option and it 
highlights "Me!Verification.SetFocus" on the OnCurrent section.  Any 
suggetions??  

Thanks,

Robin

"Douglas J. Steele" wrote:

> The declaration for Form_BeforeUpdate is incorrect.
> 
> It's supposed to be
> 
> Private Sub Form_BeforeUpdate(Cancel As Integer)
> 
> I suspect you must have typed that yourself, as opposed to letting Access 
> creating the declaration (and End Sub) for you.
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
> 
> 
> "Robin" <Robin@discussions.microsoft.com> wrote in message 
> news:4B9F1099-4398-4404-9AAA-E0FB5B1A1716@microsoft.com...
> > Hello,
> >
> > Here is the error message that I receive when I open the form.
> >
> > The expression on current you entered as the event property setting 
> > produced
> > the following error:  Procedure declaration does not match description of
> > event or procedure having the same name.
> >
> > Code used on the Before update:
> >
> > Private Sub Form_BeforeUpdate()
> > If IsNull(Me.Verification) Then
> >
> > MsgBox "You must add data here"
> >
> > Me.Verification.SetFocus
> >
> > Cancel = True
> >
> > End If
> > End Sub
> > *********************************************
> > Code used on the On current:
> >
> > Private Sub Form_Current()
> > If Me.NewRecord = False Then
> >  If IsNull(Me.Verification) Then
> >    MsgBox "You must add data here"
> >    Me!Verification.SetFocus
> >  End If
> > End If
> > End Sub
> >
> > Thanks,
> >
> > Robin
> > "Douglas J. Steele" wrote:
> >
> >> On which line is the error happening?
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no private e-mails, please)
> >>
> >>
> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
> >> news:D0402AD5-57D3-4DCE-A491-A7DF990FC316@microsoft.com...
> >> >I am still not have any success with the change.  Any other suggestions?
> >> >
> >> > Thanks,
> >> >
> >> > Robin
> >> >
> >> > "Douglas J. Steele" wrote:
> >> >
> >> >> See whether using Me!Verification instead of Me.Verification makes a
> >> >> difference.
> >> >>
> >> >> -- 
> >> >> Doug Steele, Microsoft Access MVP
> >> >> http://I.Am/DougSteele
> >> >> (no e-mails, please!)
> >> >>
> >> >>
> >> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
> >> >> news:EFCBFFA7-6FC1-461B-9889-06E40B148058@microsoft.com...
> >> >> > Hello;
> >> >> >
> >> >> > I added the code that you suggested to the "On Current" properties 
> >> >> > of
> >> >> > the
> >> >> > form. Which is:
> >> >> >
> >> >> > Private Sub Form_Current()
> >> >> > If Me.NewRecord = False Then
> >> >> >  If IsNull(Me.Verification) Then
> >> >> >    MsgBox "You must add data here"
> >> >> >    Me.Verification.SetFocus
> >> >> >  End If
> >> >> > End If
> >> >> > End Sub
> >> >> >
> >> >> >
> >> >> > I am getting a compile error msg (461).  I was hoping that you could
> >> >> > guide
> >> >> > in on what to do.
> >> >> >
> >> >> > Here is the msg that I receive when I open the form:
> >> >> >
> >> >> > Method or data member not found : compile error (461)
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Robin
> >> >> >
> >> >> > "Douglas J. Steele" wrote:
> >> >> >
> >> >> >> The BeforeUpdate event only fires before Access is about to update 
> >> >> >> a
> >> >> >> record.
> >> >> >>
> >> >> >> Sounds as though you also need code in the form's Current event. 
> >> >> >> along
> >> >> >> the
> >> >> >> lines of:
> >> >> >>
> >> >> >> If Me.NewRecord = False Then
> >> >> >>   If IsNull(Me.Verification) Then
> >> >> >>     MsgBox "You must add data here"
> >> >> >>     Me.Verification.SetFocus
> >> >> >>   End If
> >> >> >> End If
> >> >> >>
> >> >> >> The reason for checking the form's NewRecord property is to ensure
> >> >> >> that
> >> >> >> it
> >> >> >> doesn't fire when you move to a new record.
> >> >> >>
> >> >> >> -- 
> >> >> >> Doug Steele, Microsoft Access MVP
> >> >> >> http://I.Am/DougSteele
> >> >> >> (no e-mails, please!)
> >> >> >>
> >> >> >>
> >> >> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
> >> >> >> news:F2C9D37A-269D-43F5-B61D-5995DA1B4138@microsoft.com...
> >> >> >> > Hell Chris,
> >> >> >> >
> >> >> >> > The field was originally added to the table and set up as a 
> >> >> >> > required
> >> >> >> > field.
> >> >> >> > I then added the field to the forms but when I open the form with
> >> >> >> > the
> >> >> >> > existing data that comes up the newly opened field does not flag 
> >> >> >> > me
> >> >> >> > if
> >> >> >> > there
> >> >> >> > is no data.  Is it because of the existing data?  When I add a 
> >> >> >> > new
> >> >> >> > record
> >> >> >> > the
> >> >> >> > field works fine.  It flags me if there is no data.  I am working
> >> >> >> > with
> >> >> >> > a
> >> >> >> > table not a query.  I have also added code to the forms field
> >> >> >> > properties
> >> >> >> > under the "Before update"  which reads as:
> >> >> >> >
> >> >> >> > Private Sub Verification_BeforeUpdate(Cancel As Integer)
> >> >> >> >
> >> >> >> > If IsNull(Me.Verification) Then
> >> >> >> > MsgBox "You must add data here"
> >> >> >> > Me.Verification.SetFocus
> >> >> >> > Cancel = True
> >> >> >> > End If
> >> >> >> > End Sub
> >> >> >> >
> >> >> >> > What else can I do to control this field so that it will flag the
> >> >> >> > user
> >> >> >> > to
> >> >> >> > put in information before closing.  The problem is where the 
> >> >> >> > table
> >> >> >> > already
> >> >> >> > has existing data.  If adding new records it works fine, but not
> >> >> >> > with
> >> >> >> > old
> >> >> >> > data.
> >> >> >> >
> >> >> >> > Thanks,
> >> >> >> >
> >> >> >> > Robin
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > "Chris Reveille" wrote:
> >> >> >> >
> >> >> >> >> You need to add the field to the table first.
> >> >> >> >> Open table in design view
> >> >> >> >> Add new field and set required property to "Yes"
> >> >> >> >> save and close table
> >> >> >> >>
> >> >> >> >> Open form in design view
> >> >> >> >> Add new filed from table
> >> >> >> >> save form
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> "Robin" wrote:
> >> >> >> >>
> >> >> >> >> > Hello,
> >> >> >> >> >
> >> >> >> >> > I have a existing table with data already created.  I need to 
> >> >> >> >> > add
> >> >> >> >> > a
> >> >> >> >> > field to
> >> >> >> >> > this table that is going to be required from now on. When I 
> >> >> >> >> > open
> >> >> >> >> > the
> >> >> >> >> > form to
> >> >> >> >> > update the record it allows me to add the information to the
> >> >> >> >> > required
> >> >> >> >> > field.
> >> >> >> >> > But when I tested the record to see if it would flag me on the
> >> >> >> >> > required
> >> >> >> >> > field
> >> >> >> >> > by closing it, it closes without flaging me to enter the
> >> >> >> >> > information
> >> >> >> >> > in
> >> >> >> >> > the
> >> >> >> >> > required field.  Can I update existing records on a form for a
> >> >> >> >> > newly
> >> >> >> >> > added
> >> >> >> >> > required field and have it flag me if the data is not enter on 
> >> >> >> >> > a
> >> >> >> >> > form.
> >> >> >> >> >
> >> >> >> >> > Thanks,
> >> >> >> >> >
> >> >> >> >> > Robin
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >> 
> 
> 
> 
0
Utf
5/14/2007 7:59:00 PM
Assuming your text box and recordset field are both named Verification, 
rename the text box to, say, txtVerification, and then change that to 
Me!txtVerification.SetFocus

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Robin" <Robin@discussions.microsoft.com> wrote in message 
news:93C0BECC-3915-4200-9E44-1C6501405BD5@microsoft.com...
> Hello,
>
> I copied the the Before Update from another user on this forum. I am glad
> you caught this mistake.  I made the change below that you suggested to 
> the
> berupdate and now when I open the form, it opens with "you must add data
> here" and the error message reads "Run-time error '438':  Object doesn't
> support this property or method"  I then click the Debug option and it
> highlights "Me!Verification.SetFocus" on the OnCurrent section.  Any
> suggetions??
>
> Thanks,
>
> Robin
>
> "Douglas J. Steele" wrote:
>
>> The declaration for Form_BeforeUpdate is incorrect.
>>
>> It's supposed to be
>>
>> Private Sub Form_BeforeUpdate(Cancel As Integer)
>>
>> I suspect you must have typed that yourself, as opposed to letting Access
>> creating the declaration (and End Sub) for you.
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> news:4B9F1099-4398-4404-9AAA-E0FB5B1A1716@microsoft.com...
>> > Hello,
>> >
>> > Here is the error message that I receive when I open the form.
>> >
>> > The expression on current you entered as the event property setting
>> > produced
>> > the following error:  Procedure declaration does not match description 
>> > of
>> > event or procedure having the same name.
>> >
>> > Code used on the Before update:
>> >
>> > Private Sub Form_BeforeUpdate()
>> > If IsNull(Me.Verification) Then
>> >
>> > MsgBox "You must add data here"
>> >
>> > Me.Verification.SetFocus
>> >
>> > Cancel = True
>> >
>> > End If
>> > End Sub
>> > *********************************************
>> > Code used on the On current:
>> >
>> > Private Sub Form_Current()
>> > If Me.NewRecord = False Then
>> >  If IsNull(Me.Verification) Then
>> >    MsgBox "You must add data here"
>> >    Me!Verification.SetFocus
>> >  End If
>> > End If
>> > End Sub
>> >
>> > Thanks,
>> >
>> > Robin
>> > "Douglas J. Steele" wrote:
>> >
>> >> On which line is the error happening?
>> >>
>> >> -- 
>> >> Doug Steele, Microsoft Access MVP
>> >> http://I.Am/DougSteele
>> >> (no private e-mails, please)
>> >>
>> >>
>> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> >> news:D0402AD5-57D3-4DCE-A491-A7DF990FC316@microsoft.com...
>> >> >I am still not have any success with the change.  Any other 
>> >> >suggestions?
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Robin
>> >> >
>> >> > "Douglas J. Steele" wrote:
>> >> >
>> >> >> See whether using Me!Verification instead of Me.Verification makes 
>> >> >> a
>> >> >> difference.
>> >> >>
>> >> >> -- 
>> >> >> Doug Steele, Microsoft Access MVP
>> >> >> http://I.Am/DougSteele
>> >> >> (no e-mails, please!)
>> >> >>
>> >> >>
>> >> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> >> >> news:EFCBFFA7-6FC1-461B-9889-06E40B148058@microsoft.com...
>> >> >> > Hello;
>> >> >> >
>> >> >> > I added the code that you suggested to the "On Current" 
>> >> >> > properties
>> >> >> > of
>> >> >> > the
>> >> >> > form. Which is:
>> >> >> >
>> >> >> > Private Sub Form_Current()
>> >> >> > If Me.NewRecord = False Then
>> >> >> >  If IsNull(Me.Verification) Then
>> >> >> >    MsgBox "You must add data here"
>> >> >> >    Me.Verification.SetFocus
>> >> >> >  End If
>> >> >> > End If
>> >> >> > End Sub
>> >> >> >
>> >> >> >
>> >> >> > I am getting a compile error msg (461).  I was hoping that you 
>> >> >> > could
>> >> >> > guide
>> >> >> > in on what to do.
>> >> >> >
>> >> >> > Here is the msg that I receive when I open the form:
>> >> >> >
>> >> >> > Method or data member not found : compile error (461)
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Robin
>> >> >> >
>> >> >> > "Douglas J. Steele" wrote:
>> >> >> >
>> >> >> >> The BeforeUpdate event only fires before Access is about to 
>> >> >> >> update
>> >> >> >> a
>> >> >> >> record.
>> >> >> >>
>> >> >> >> Sounds as though you also need code in the form's Current event.
>> >> >> >> along
>> >> >> >> the
>> >> >> >> lines of:
>> >> >> >>
>> >> >> >> If Me.NewRecord = False Then
>> >> >> >>   If IsNull(Me.Verification) Then
>> >> >> >>     MsgBox "You must add data here"
>> >> >> >>     Me.Verification.SetFocus
>> >> >> >>   End If
>> >> >> >> End If
>> >> >> >>
>> >> >> >> The reason for checking the form's NewRecord property is to 
>> >> >> >> ensure
>> >> >> >> that
>> >> >> >> it
>> >> >> >> doesn't fire when you move to a new record.
>> >> >> >>
>> >> >> >> -- 
>> >> >> >> Doug Steele, Microsoft Access MVP
>> >> >> >> http://I.Am/DougSteele
>> >> >> >> (no e-mails, please!)
>> >> >> >>
>> >> >> >>
>> >> >> >> "Robin" <Robin@discussions.microsoft.com> wrote in message
>> >> >> >> news:F2C9D37A-269D-43F5-B61D-5995DA1B4138@microsoft.com...
>> >> >> >> > Hell Chris,
>> >> >> >> >
>> >> >> >> > The field was originally added to the table and set up as a
>> >> >> >> > required
>> >> >> >> > field.
>> >> >> >> > I then added the field to the forms but when I open the form 
>> >> >> >> > with
>> >> >> >> > the
>> >> >> >> > existing data that comes up the newly opened field does not 
>> >> >> >> > flag
>> >> >> >> > me
>> >> >> >> > if
>> >> >> >> > there
>> >> >> >> > is no data.  Is it because of the existing data?  When I add a
>> >> >> >> > new
>> >> >> >> > record
>> >> >> >> > the
>> >> >> >> > field works fine.  It flags me if there is no data.  I am 
>> >> >> >> > working
>> >> >> >> > with
>> >> >> >> > a
>> >> >> >> > table not a query.  I have also added code to the forms field
>> >> >> >> > properties
>> >> >> >> > under the "Before update"  which reads as:
>> >> >> >> >
>> >> >> >> > Private Sub Verification_BeforeUpdate(Cancel As Integer)
>> >> >> >> >
>> >> >> >> > If IsNull(Me.Verification) Then
>> >> >> >> > MsgBox "You must add data here"
>> >> >> >> > Me.Verification.SetFocus
>> >> >> >> > Cancel = True
>> >> >> >> > End If
>> >> >> >> > End Sub
>> >> >> >> >
>> >> >> >> > What else can I do to control this field so that it will flag 
>> >> >> >> > the
>> >> >> >> > user
>> >> >> >> > to
>> >> >> >> > put in information before closing.  The problem is where the
>> >> >> >> > table
>> >> >> >> > already
>> >> >> >> > has existing data.  If adding new records it works fine, but 
>> >> >> >> > not
>> >> >> >> > with
>> >> >> >> > old
>> >> >> >> > data.
>> >> >> >> >
>> >> >> >> > Thanks,
>> >> >> >> >
>> >> >> >> > Robin
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Chris Reveille" wrote:
>> >> >> >> >
>> >> >> >> >> You need to add the field to the table first.
>> >> >> >> >> Open table in design view
>> >> >> >> >> Add new field and set required property to "Yes"
>> >> >> >> >> save and close table
>> >> >> >> >>
>> >> >> >> >> Open form in design view
>> >> >> >> >> Add new filed from table
>> >> >> >> >> save form
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> "Robin" wrote:
>> >> >> >> >>
>> >> >> >> >> > Hello,
>> >> >> >> >> >
>> >> >> >> >> > I have a existing table with data already created.  I need 
>> >> >> >> >> > to
>> >> >> >> >> > add
>> >> >> >> >> > a
>> >> >> >> >> > field to
>> >> >> >> >> > this table that is going to be required from now on. When I
>> >> >> >> >> > open
>> >> >> >> >> > the
>> >> >> >> >> > form to
>> >> >> >> >> > update the record it allows me to add the information to 
>> >> >> >> >> > the
>> >> >> >> >> > required
>> >> >> >> >> > field.
>> >> >> >> >> > But when I tested the record to see if it would flag me on 
>> >> >> >> >> > the
>> >> >> >> >> > required
>> >> >> >> >> > field
>> >> >> >> >> > by closing it, it closes without flaging me to enter the
>> >> >> >> >> > information
>> >> >> >> >> > in
>> >> >> >> >> > the
>> >> >> >> >> > required field.  Can I update existing records on a form 
>> >> >> >> >> > for a
>> >> >> >> >> > newly
>> >> >> >> >> > added
>> >> >> >> >> > required field and have it flag me if the data is not enter 
>> >> >> >> >> > on
>> >> >> >> >> > a
>> >> >> >> >> > form.
>> >> >> >> >> >
>> >> >> >> >> > Thanks,
>> >> >> >> >> >
>> >> >> >> >> > Robin
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>> 


0
Douglas
5/14/2007 8:54:14 PM
Reply:

Similar Artilces:

need advice on server 2003 running AD and exchange 2003
I received an Event ID 9665 telling me that the memory settings for my server is not optimal for Exchange. When i researched the error, I was directed to article 815372 on Microsoft's website. I know this instructions on how to optimize the memory usage for Exchange Server 2003 but one of the notes states that Microsoft does not recommend setting the /3GB switch in the boot.ini if the server used for Exchange is also an Active Dirctory Domain Controller. I need advice on how to resolve this issue. Should I turn off the memory configuration check? Should I ignore the warning? I know that ...

Help with Formula to organize information / date fields
Hi, I'm hoping you can help me with a problem. At work I work with a database of information ( the database is locked, so I can't just add a report for the info that I need..) What I have is a list of information - with names, roles, and years. What I would like to do is find an easy way to have the date information in multiple columns so we don't print off a new line for each person. Existing Data Col A Col B Col C Laura 2006 Job 1 Laura 2007 Job 1 Bob 2006...

DPM2010 RTM
I'm trying to setup SMTP without authentication however it always returns the error ID 2013 logon failure. 2007 worked fine, can 2010 send alert with anonymous SMTP? Can you check if you can send mail using some other tool(powershell has send mail equivalent command) from the DPM machine to send an email using the same account? -- Thanks, Praveen D [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. DPM Newsgroup will be deprecated very soon. Please start using DPM TechNet forum at:http://social.technet.microsoft.com/Forums/en...

2003 PIvotTable Calculated Fields
Simple question...Can you use an If function in a PivotTables formulas (Calculated Field)? If so can you provide an example for syntax purposes. Thank you! If you want to get to the format cells dialog quickly, you can use: ctrl-1 But then you're still using the dialog... Kay wrote: > > Simple question...Can you use an If function in a PivotTables formulas > (Calculated Field)? If so can you provide an example for syntax purposes. > Thank you! -- Dave Peterson Hi Dave, I think you are responding to the wrong Kay...My question is about PivotTab...

On Open event to clear all form fields or not..
I have the following code in my OnOpen event of my word document form. As long as you answer "Yes" to the msg box the code works fine, but if you say no, then it exposes rows in my form that contain VBA buttons and radio buttons. Can anyone help me out with how to fix this? Thanks so much.... Here is the code: Dim myFormField As FormField Dim aDoc As Document Dim response Dim msg As String Set aDoc = ActiveDocument msg = "Do you want to clear all FormField results?" response = MsgBox(msg, vbYesNo) If response = vbYes Then For Each myFormField I...

adding digits to front/end of fax numbers
how do i add "1" before each fax number and ",,7741" at the end of each one? we have to dial one to dial long distance and we have a code to use the long distance in our office. please help quickly. Thanks Hi! Fax number in A1: =1&A1&",,7741" If you want a space after the 1: =1&" "&a1&",,7741" Biff "Luke" <Luke@discussions.microsoft.com> wrote in message news:D1C25AF0-7FBC-43CE-855D-FCCA77CD9759@microsoft.com... > how do i add "1" before each fax number and ",,7741" at the en...

Email address already exists error
When I try to add an alias to one of the users in Exchange 2003 I get an error stating that the user already exists in the organization. We have 6 users, who's name or alias are not any where close. I tried deleting all their alias', and setting them up again, but that just seemed to make the problem worse. I tried following knowledge base 280765 but only came up with the original address. Is there a cleanup tool or some other tool I need to run to sync Exchange with AD to clear this problem up? Any help would be greatly appreciated... JTT Find out who has the address: ldif...

BP-System Requirements
Does anyone know where I can find more detail information on Web Server requirements for Business Portal? I'm looking for more detail on user access. We are talking about 400 users accessing it. What's the best approach? How many users per web server? Any help out there ... thanks Yes, there was a session at Convergence on this topic. If you have access to the Convergence site, go to https://www.msconvergence.com/downloads.aspx and scroll down to GP09 Planning for your Business Portal Implementation and Deployment. There is a zip file with a TON of good information. &quo...

Purchase order Required
I would like to see a checkbox option in the customer screen Purchase Order number Required. Currently, there is nothing in SOP forcing you to enter data into the PO field. This in turn causes payment delays when a PO # is left off an order. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree&q...

Calculating field
How can I calculating value in a fields no1 and value1? Initial, no1 and value1 is null. name no value_in atr no1 value1 --------------------------------------------------- n1 4 20 in 4 20 n1 3 120 in 7 140 (7=4+3 and 140=120+20) n1 2 out 5 100 (5=7-2 and 100=140-2*(140/7) n1 2 30 in 7 130 (7=5+2 and 130=100+30) Do you have some sequential field to sort by?...

Validate 2 Fields
I found a couple similar examples but have given up trying to get them to work. The 1st 2 fields on a form (Date1 and Location) need to be validated to ensure that the data is not already in the database. If the information for a date and location are already in the table (dbo_uRMData) when one moves off the location field, I want a message to be displayed that the data is already entered in the dbo_uRMData table, the form cleared, and the Date1 code to have focus. Your help, AS ALWAYS, is so much appreciated. Jani -- Dave Hargis, Microsoft Access MVP Use the Before Update event of t...

Smartlist Restriction
I am using the Restrictions button in the SmartList Builder window to add a restriction. I had no trouble adding restrictions based on checkbox fields and string fields. However, when the field is a drop-down, the 'Value' field on the Add Restriction window becomes a drop-down filed itself. Unfortunately, rather than being filled with the available values for the chosen field, the Value field is a blank drop-down. It is also uneditable. Is it possible to add restrictions in this manner on drop-down fields? Craig, What are you trying to build? Any examples you can provide? B...

reading and displaying memo fields
I got an ODBC database with a memo field. Now I use a CRecordSet in VC6 to read the database with CLongBinary for the memo field. After reading 18 fields he's out of memory. Is there a way to use CString instead of CLongBinary, cause it's only text in the memo fields (I already tried, but then I get an error message that the database could not be read)? Or is there a way to read all other fields first and only read the memo field when the user choose a specific item in the database? Thank you for helping me! ...

Cell format requires manual edit
I have a problem with changing the format of a pure number in a cell formatted as a text. After the type is changed to a number (actually it's changed to special - 000000), the cell refuses to change until after the cell is edited (with or without changes) and the ENTER key is pressed. Is there an easy way around this? A similar thing happens with a cell has a special enter character. Editing the cell and pressing enter changes the cell format to word wrap and to recognize the special character, though the character is not usually desired. I know how to delete the special characters wi...

C#.Net developer required by direct client in Manchester
C#.Net developer required by direct client in Manchester - NH Duration: FTE/Direct Hire or Contract to Hire/Temp to Perm Location: Manchester, NH *** IN_PERSON interview required***** * design and develop robust, high level web applications using C#, ASP.Net and SQL Server. * Ability to handle UI, middleware and backend application development and de-bugging of applicaitons * quality control of application developed * responsible for coordination of application development with on-site and off-site development team * Business Liaison with vendors and stake holders Required Skills: C#, ASP....

Excel Stop Recording Button Disappeared
I have Office 2000 and I use Excel to record macros in my workbooks. In the past a "Stop Record" button would show up when I would begin recording a macro, but at some point it stopped displaying. Why did it go away and how do I get that button to display again? Hi Start recording a macro, using Tools|Macro|Record new macro. Enter on the name form. Click on Tools|Customise|, select Tools, scroll down to Record Macro and click on it. Go out of the customising screen and it will be back. Stop the recording by clicking on the stop button. Hey DON'T click on the X aga...

PO Remarks field problem
Does anyone know why I can only insert about 30 characters in the Remarks field on the purchase order? Can I change that to be unlimited? I was planning to move down the Remarks field to the bottom of the page right above the Authorize By Signature and give it about 5 lines of space to fill in a remark. Regards, -- Microsoft Partner ...

urgent requirement for project leader/apm required
hi, we are having urgent requirement for one of our client cmmi level5 company in hyd and chennai. if u r intrested send me ur updated resume gangadhar.sadhu@optionsindia.com Skill Microsoft Technologies Job Description Project Leader / APM required: Minimum 6 years experience out of which 2/3 years as PL / APM Education MCA / BE / Computer Science Graduates Technology - Microsoft VB / ASP .Net exposure - RDBMS - Oracle / SQL Server Experience in development & implementation in following Domains: Financial Costing Purchase & Inventory Sales Automation Payroll HR ...

Exporting fields in CRM 4.0 Knowledgebase
I'm attempting to export some of the fields in the CRM 4.0 knowledgebase, and most of them are easy enough to do, as they are non-joined fields. However, the "Body" of the KB I'm a little unsure about. I see int he SQL table/view, there is an "articlexml" field and a "content" field. I'm unsure on how to hand the export of these two fields, or if I can disregard one of the fields. Does anyone have any ideas for handling this type of content? -- Sketchy ...

How to delete a user from AD without CRM troubles?
Hello! Can you state the recomended procedure in CRM before a user is deleted from the AD (eg. when someone leaves the company) so that there will be no troubles in CRM? Is there a way to retrieve the license of a user that was deleted from AD before been disabled in CRM? -- SiEBEN Innovative Solutions http://www.sieben.gr ������� ������ 28, 141 21, �. ��������, ����� ���: +30 2 10 2724433 Fax: +30 2 10 2724439 Hi, here is a procedure: 1. Remove CRM license of the user 2. Disable the user in CRM 3. Delete the user from the AD. Erik "SiEBEN Innovative Solutions" <newsgrou...

show continous fields
I would like a control (or subform) on a form to behave similar to a report field set to "can grow" and "can shrink". I want to view several records continously, not broken up like the continuous forms requires, but more like a report that shows the data continuously. I tried putting report on a form like a subform, but MS Access doesn't go for that. Is there any way to accomplish this? In this setting the data is for viewing only. -- sam Yo can use the form record source to remove the records that you don't want to display, if Null or Empty? Why do you need...

Determining when user adds new records
I have a form that allows adding new records. I want to set a few controls to particular values (based on user ID and location) when the new record is first displayed. Can I trap the new record addition anywhere? I don't think you can trap it per se. but you can set a timestamp when the new record is created, and by whom. Use the Current event: Sub Form_Current() If Me.NewRecord = True Then Me.txtTimeStamp = Now Me.txtUser = fOSUserName() End If End Sub The fOSUserName function is here: http://www.mvps.org/access/api/api0008.htm -- Ar...

set default record to a table
I have a shared db with various front ends (mde). I would like to set a paricular record as my default record, so whenever someone opens up the various db forms it opens up to the same default record. Is this possible? Maybe this is a matter of terminology... In Access, data is stored in tables. Each table has it's own records (collections of related data). When you say you want a "record" to be the default one pulled up by everyone, how do you know they are all using their different forms to look at the same data (i.e., table)? Next, why? What is it about ...

Secondary lookup field in CRM 4.0
Hello all. I have a question regarding secondary lookup field within the form of the Opportunity entity on CRM 4.0 (upgraded from 3.0). To be able to display a secondary lookup (pointed to contacts), I have used a JScript (as well as two new attributes) on the form's onLoad event (pasted below). It worked fine on CRM 3.0 but after the upgrade to 4.0, the form doesn't report any JScript error but no lookup field is displayed - only the lookup icon is there and it doesn't respond to clicking. I haven't been able to find what parts of the JScript should be changed in order...

bandwidth requirements
I have been told there are minimum bandwidth requirements for some applications. Can anyone tell me if this is true and what the minimum bandwidth requirements would be for Microsoft Exchange? That depends on your organization size: how many users, how many servers, messaging habits, etc. For a branch office with 30 users and a centralized Exchange server, 64 Kb may be sufficient... Or not! -- Blog "subject: exchange" http://spaces.msn.com/members/ehlo "Terri" <nospam.ttremblay@dca-falcon.com> wrote in message news:10v2blrpetc6j9f@corp.supernews.com... &...