DataBase - Action Button Question
Asked By Timothy Millar
20-Nov-09 08:51 PM
I have a button that is unbound. I also have a text box. I want to program
the button that when clicked it will place the current date and time at the
end of all text (if applicable) in the text box.
Let me thank you a head of time
Jeanette Cunningham replied to Timothy Millar
Put code like this on the click event of the button.
Me.txt1 = Me.txt1 & " " & Now()
note: replace txt1 with your own object name.
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
field Width in report and horizontal alignment DataBase Hi all I have 2 adjacent textboxes, txt1 and txt 2 (with controlsource) in a report. I want to be able to automatic adjust the width of txt1 to accomodate with data varying from 10 to 25 chars. Next I want the adjacent textbox to align to the immediate right side of txt1. How to, VBA, Macro other? Access Reports Discussions RE (1) VBA (1) Field (1) Query Controlsource (1) I am not sure if this is what you want but try concatenating txt1 and txt 2. In your source query put Txt1-2:[txt1]&" "&[txt2] Use Txt1-2 in your report Dont quite get it. Add a new field called txt1-2 to my query or how? I am assuming you are basing your report on
my following codes don't work. Can you help me? I already created a textbox (txt1) in the Detail section. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me!txt1.Value = "ABC" Then txtPara1ABC.Visible = -1 txtPara1SomethingElse.Visible = 0 Else txtPara1SomethingElse.Visible = -1 txtPara1ABC.Visible 1) TxtPara1ABC.Visible (1) TxtPara1SomethingElse.Visible (1) TxtPara1ABC (1) Database (1) Report (1) FormatCount (1) Txt1.Value (1) Words like "Codes don't work" do not really help us very much the code and step through it to see what is happening? What? Anyway, what is [txt1]? Is it bound to a field in the report's record source? Or is it code to this: Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) txtPara1ABC.Visible = Me!txt1 = "ABC" txtPara1SomethingElse.Visible = Not Me!txt1 = "ABC" End Sub But first you have to make sure that there is a value in [txt1]. - - Fred Please respond only to this newsgroup. I do not reply to personal e-mail there is in it. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.txt1 = "ABC" Then Me.txtPara1ABC.Visible = True Me.txtPara1SomethingElse.Visible = False Else Me.txtPara1SomethingElse.Visible = True
I have them only appearing when a True value is encountered by utilizing the code: txt1.visible = Nz ([txt1], 0)<> ) Each of my textboxes is labeled txt1, txt2, txt3 etc. . . I would appreciate any help, as this is the final step in Discussions Report (1) ExerciseDetails (1) DateofExercise (1) ExerciseType (1) IngLeft (1) Hookom (1) Duane (1) Txt1.visible (1) Hi Loren, If they are not visible, then why move them? If you space. I have been able to hide each of the 41 textboxes with the code: txt1.visible = 3D Nz ([txt1], 0)<> ) The problem now is that I can not use a similar code that I
files in desktop DataBase Hello In Access 2003, I have a form with a texbox(txt1) showing ID which is in a Table (MyTable). The form displays a Query. In C:BD / A are the files identified by a the code showed in txt1. In the form I need a button to read the code in txt1, go to C:BD / A, copy the file and paste or download in desktop. Your help is greatly appreciated. Access Forms Coding Discussions Access 2003 (1) DetailsHelloIn (1) Texbox (1) Txt1 (1) I include more details Hello In Help I have been trying the function Dir button. I need the button for: 1. Read the path of the file showed in txt1 2. Search the file 3. Copy the file 4. Paste the file on Desktop This is an example of the path showed in txt1. C: \ BD \ A \ FR0021998RPT002.PDF keywords: Button, to, paste, or, download, files, in, desktop description Hello In Access 2003, I have a form with a texbox(txt1) showing ID which is in a Table (MyTable). The form displays a Query. In C
dovrei passare dei parametri per eseguire una stored: parametro numerico: EXEC "EXEC dbo.bb "& me.txt1 parametro stringa. EXEC "EXEC dbo.bb ' " & Me.txt1 &"'" e se devo passare due parametri uno numerico (id) e uno stringa? ciao grazie Access dovrei passare dei parametri per eseguire una stored: parametro numerico: EXEC EXEC dbo.bb & me.txt1 parametro stringa. EXEC EXEC dbo.bb '