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  

updating records



 
 
Thread Tools Display Modes
  #1  
Old December 11th, 2005, 06:44 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

i have a simple form from a table and it will not allow duplicate SS# which
is what i want. however when i use the form i want to be able to edit a SS#
already in the table and when i enter the SS# in the form and then hit find i
get a duplicate error.
  #2  
Old December 11th, 2005, 06:54 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

Bronson wrote:
i have a simple form from a table and it will not allow duplicate SS#
which is what i want. however when i use the form i want to be able
to edit a SS# already in the table and when i enter the SS# in the
form and then hit find i get a duplicate error.


Why would you think typing a SS# on an existing record would take you to a
different record? What you are doing is changing the existing record so its SS#
value is the same as some other record and the database is correctly telling you
that you can't do that.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #3  
Old December 11th, 2005, 07:16 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

I apoligize i need to pull that SS# up to edit data on that record. and if
the SS# is not in the table then it will allow me to add the record.

"Rick Brandt" wrote:

Bronson wrote:
i have a simple form from a table and it will not allow duplicate SS#
which is what i want. however when i use the form i want to be able
to edit a SS# already in the table and when i enter the SS# in the
form and then hit find i get a duplicate error.


Why would you think typing a SS# on an existing record would take you to a
different record? What you are doing is changing the existing record so its SS#
value is the same as some other record and the database is correctly telling you
that you can't do that.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com



  #4  
Old December 11th, 2005, 07:33 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

Bronson wrote:
I apoligize i need to pull that SS# up to edit data on that record.
and if the SS# is not in the table then it will allow me to add the
record.


A control can be used to ENTER the SS# or to FIND a specific SS#. You cannot
use the same control to do both. Which is it that you want to do?

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #5  
Old December 11th, 2005, 07:40 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

i need one to find, i suppose and will leave the form i have now to enter. I
should be able to just make a copy of the current form correct and use it as
an modify form.

"Rick Brandt" wrote:

Bronson wrote:
I apoligize i need to pull that SS# up to edit data on that record.
and if the SS# is not in the table then it will allow me to add the
record.


A control can be used to ENTER the SS# or to FIND a specific SS#. You cannot
use the same control to do both. Which is it that you want to do?

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com



  #6  
Old December 11th, 2005, 07:46 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

Bronson wrote:
i need one to find, i suppose and will leave the form i have now to
enter. I should be able to just make a copy of the current form
correct and use it as an modify form.


Just add an additional TextBox labelled GoTo... In its AfterUpdate event have
code...

Me.Filter = "[SS#] = '" & Me![GoTo] & "'"
Me.FilterOn = True

If the entry exists the form will display it. If not the new record position
will be displayed so you can make a new record.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #7  
Old December 11th, 2005, 08:17 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

getting an error stating no macro for this function

"Rick Brandt" wrote:

Bronson wrote:
i need one to find, i suppose and will leave the form i have now to
enter. I should be able to just make a copy of the current form
correct and use it as an modify form.


Just add an additional TextBox labelled GoTo... In its AfterUpdate event have
code...

Me.Filter = "[SS#] = '" & Me![GoTo] & "'"
Me.FilterOn = True

If the entry exists the form will display it. If not the new record position
will be displayed so you can make a new record.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com



  #8  
Old December 11th, 2005, 08:50 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

Bronson wrote:
getting an error stating no macro for this function


The code does not go directly into the property box. You enter [Event
Procedure] in the box and then press the build button [...] to the right. That
will take you to the vba code window and that is where you place that code.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #9  
Old December 11th, 2005, 09:26 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

Just want to make sure i read this right. I got it to modify but it will not
add a new record. Is this where i will have to use another form to add
entries?

"Rick Brandt" wrote:

Bronson wrote:
getting an error stating no macro for this function


The code does not go directly into the property box. You enter [Event
Procedure] in the box and then press the build button [...] to the right. That
will take you to the vba code window and that is where you place that code.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com



  #10  
Old December 11th, 2005, 09:55 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default updating records

Bronson wrote:
Just want to make sure i read this right. I got it to modify but it
will not add a new record. Is this where i will have to use another
form to add entries?


Applying a filter that returns no matched will not "create" a new record, but it
should position the form at the new record position so you can make the entry.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


 




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
Surpress Confirmation Messages while updating records with VBA Rasmus General Discussion 3 November 14th, 2005 05:19 PM
Updating records from the form TLuebke Using Forms 1 October 31st, 2005 08:17 PM
Deleting specific records [email protected] General Discussion 6 June 22nd, 2005 11:35 PM
New records can't be seen rleblanc Using Forms 6 August 14th, 2004 02:43 PM
Updating field on a record that has related records. David Andrews General Discussion 3 June 10th, 2004 10:16 AM


All times are GMT +1. The time now is 06:58 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.