Record Set - Amending or Editing

C

Chris hillman

Hello All,

I currently have a form that you fill in, and im wanting it to amend a
RecordSet(table) when the save button is hit.

So when the code runs, I need it to look up the ID on the form and find the
record set in the table, and then if its the same then whizz in the values.

Problem Im having it I can't see to find the record set to edit.

With rstTeam
.FindFirst "[Variable] = 'Team_ID' "
If .NoMatch Then
MsgBox "Please come again"
Else
.Edit
!Team_Name = [Team_Name]
!eMail =
!Hidden = [tglHide]
.Update
End If
 
J

John W. Vinson

On Wed, 24 Jun 2009 22:42:01 -0700, Chris hillman <Chris
Hello All,

I currently have a form that you fill in, and im wanting it to amend a
RecordSet(table) when the save button is hit.

So when the code runs, I need it to look up the ID on the form and find the
record set in the table, and then if its the same then whizz in the values.

Problem Im having it I can't see to find the record set to edit.

With rstTeam
.FindFirst "[Variable] = 'Team_ID' "
If .NoMatch Then
MsgBox "Please come again"
Else
.Edit
!Team_Name = [Team_Name]
!eMail =
!Hidden = [tglHide]
.Update
End If
[/QUOTE]

Ummm...

WHY!?

You're doing something very easy in a very difficult manner.

Why not just base the form on the table, and edit it directly? You can put a
combo box on the form to navigate to the desired record.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top