PC Review


Reply
Thread Tools Rate Thread

RE: how to update a field record based on inputbox?

 
 
Steve Sanford
Guest
Posts: n/a
 
      15th May 2010
It looks like you have a button named "botãodecomando" on the form that you
click when you want to update the field.

Try this (modified) code:

'-------------beg code--------------
Private Sub botãodecomando_Click()
Dim Strg As String
Dim sTitle As String
Dim sPrompt As String
Dim sFechado As String

sFechado = Me.Fechado
sTitle = "Técnico BPO - Rdinis"
sPrompt = "Escreva Sim para Fechar o Processo."
sPrompt = sPrompt & vbNewLine
sPrompt = sPrompt & "Escreva Não para Manter o Processo em Aberto."
sPrompt = sPrompt & vbNewLine & vbNewLine
sPrompt = sPrompt & "O estado actual do processo está fechado?"

Strg = ""
Strg = InputBox(sPrompt, sTitle)

If Len(Strg) > 0 And Strg <> sFechado Then
Me.Fechado = Strg
End If

End Sub
'-------------end code--------------

HTH
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)


"puppetmint" wrote:

> Hello access friends,
> Thanks for helping.
>
> First of all, let me tell you that i have a form named "Processos" based on a
> table named "Processos Rdinis", and this table has a primary Key named
> "IDdeProcesso", a fiel named "Fechado" and another field named
> "IDdeCandidatura". My question is how do i get an input box to update the
> record on the field named "fechado" when i'm in the form named "Processos". I
> need the input box to tell me the current state of the field, and to update
> it if necessary.
> The first part is working, i can see the present state of the field, but i
> don't know how to update it.
> this is the code that i have:
>
> Private Sub botãodecomando_Click()
> Dim Strg As String, SqlStrg As String
> Dim Fechado As String
>
> Fechado = Me.Fechado
> Strg = ""
> Strg = InputBox("Escreva Sim para Fechar o Processo." & vbNewLine & "Escreva
> Não para Manter o Processo em Aberto." & vbNewLine & vbNewLine & "O estado
> actual do processo está fechado?" & vbNewLine & Fechado, "Técnico BPO -
> Rdinis")
>
> End Sub
>
> Thank you all for your help.
>
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a record in a table be locked to updates based record.field va Jimbo213 Microsoft Access Security 6 4th Jun 2008 10:48 PM
showing record totals from one field based on current record criteria chanchito Microsoft Access 7 25th Oct 2006 04:05 AM
update multiple fields in a record based on a record in another table bertil.hedenstrom@gmail.com Microsoft Access Queries 3 19th Sep 2006 11:49 AM
Use data from field A on record I to update field B on record II matt@doeblerlaw.com Microsoft Access Forms 10 28th Aug 2006 09:49 PM
update a record based on another updated record =?Utf-8?B?dGFkYWly?= Microsoft Access 2 17th Feb 2006 02:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:09 PM.