Help With Button Click And Copying Control Values
Aug 21, 2007
Hello everyone, hopefully you can help before I go crazy. i have been working on this problem now for 3-4 days.
I have two forms (ID-Injury Choice) and (Treatments). In both forms I have the control (InjuryID). What I am trying to do is when I click a button on the ID-Injury Choice form, the InjuryID control value is automatically transferred to the Treatments form.
For the life of me I can figure out this simple act. Any help would be appreciated.
View Replies
ADVERTISEMENT
Nov 7, 2006
Often I use Labels as buttons due to the fact I can colour them the way I want, and use the on click event to trigger code.
The code below however works for a command button, but not a label button.
DoCmd.OpenForm "frmdatetime"
Do While Forms!frmdatetime!OKFlag.Caption = "False"
DoEvents
Loop
When this code is run by clicking on a command button, it works fine.
If run by clicking on a label, frmdatetime opens, but the mouse will not work on either of the 2 open forms unless you go down to the windows task bar, jump onto another window, and back onto frmdatetime.
If I remove the loop with the DoEvents in it, then the problem does not occur.
Can anyone enlighten me as to why this behaviour occurs.
Thanks
Richard
View 4 Replies
View Related
Oct 30, 2006
Hi,
I have an old form (see oldform pics) and a new form (see newform pics).
The old form has controls on it which work just dandy (well, at least they display and store information).
The new, tabbed, form however does not. What's up with that?
I simply created a form, created a tab control, went to my old form in design view, selected some objects, right-clicked-copy, went back to the new tabbed form, right-clicked-paste somewhere in the middle on the tab control, and... Presto! Nothing.... Just #Name?
Strange thing is, when I create the control, for example InitialCall, myself or using the wizard, the #Name? disappears, so then it works like it should.
What's going on? I need to do this for a bunch of controls.... and I would hate to have to do them all 140+ all over again by hand.... copy/paste would be so nice..... :)
View 3 Replies
View Related
Sep 1, 2004
Hi All , Im still quite new to access and would like some help with the following
I have a sub form for a help desk database i have created which states the username and Pc name
i want to be able to press an action button that will copy these 2 fields from the sub form the the equivilent fields in my main form.
i guess i just dont want to have to keeping pressing Ctl c and v each time .
can this be done ?
many thanks in anticipation
View 1 Replies
View Related
Dec 14, 2005
Ok so here is the problem I need help with,
I have a prices table that stores all the different price changes for each part I have in my Parts table what I need to figure out how to do is to copy the "Last" price for that part from the price table into the Price field of the Parts table or have some way of updating it automatically either by macro or what not - example:
Price Table:
PriceID (PKey)
PartID (Connected to Part Number ID)
Price
Price Added( Date & Time when price was added so I can groupby "Last" or "Max" in the Price Query I have made)
------------------------
Parts Table:
PartID (Pkey)
Part Number
Price
-------------
Now how do I take the value my Price query gives me for "Last" or "Max" Price using the last date for that parts price and have it automatically get copied into the Parts Table price?
Thanx
View 3 Replies
View Related
Jul 23, 2013
I have two tables. TableA and TableB They both have the same columns.
I need a query that will look at the diferences between TableA.Column1 and TableB.Column1 and copy whatever TableB.Column1 is missing from TableA.Column1
So I want it to copy over the entire record based on what TableA.Column1 has the TableB.Column1 does not have.
View 2 Replies
View Related
Jun 19, 2007
Hi,
I am trying to make a combobox visible when the user clicks on one of a tab control buttons. I wrote this code below, but I does not seem to work. Both the tab control and the combo are on the same form.
Private Sub L_B_Consent_Click()
Me.cmbLBConsent.Visible = True
End Sub
Any help will be very much appreciated.
Thanks,
B
View 9 Replies
View Related
Jan 24, 2006
Dont be overwhelmed by the following, but it may require some extensive thought and I dont expect everyone to understand....
I want to have a unbound form control a subform. On the form I have an unbound text area entitled txtDate. In this area it displays the current date being viewed. I have put left and right buttons on the main form that will add (+1) one day to the date being shown and subtract (-1) one day from the date being shown. I want to conrol it though the "On Click" but I dont know what to enter in the "On Click" field that will allow me this. The reason is, co-insiding with the previous, when the date is changed, the subform is also changed to a new day. Therefore instead of displaying 24 hours of today, you can view 24 hours of yesterday, tomorrow and so on. See, if one is to set the onclick to be: Me.txtDate=Me.txtDate-1, or Me.txtDate=Me.txtDate+1, it calls for a custom macro and I dont know why. I know it somehow resides in some similar command set up.
I also need to know how to make the subform bound but continous, and what exactly does that mean?
Anyone care to offer some assistance? :confused:
View 4 Replies
View Related
Sep 19, 2013
I have a date control and on the Click event I run the following code. Trouble is the Date Control stops working, ie you can't change the date after one click ?
CODE.
Private Sub Calendar7_Click()
weekofyeartxt.Value = DatePart("ww", Calendar7.Value)
End Sub
View 3 Replies
View Related
Jul 3, 2015
How can I move to control on form when user clicks on another control on same form? In other words... have set validation on controls and unless I disable all the other controls on form until I need it enabled, user can click on other control and get out of the validation sequence. Need to send user back to control they were on when they click on a different control elsewhere...
View 3 Replies
View Related
Sep 20, 2006
Ok if I sound like I do not know what I am talking about, that would be correct. That is why I am asking here.
So I have this form called frm_UserMaintenance
On The form I have a button
I would like to have an OnClick event that will activate one of the dialogue boxes on the tools menu.
Heres the catch. The menu is not visible and i do not want to make it visible. This makes using sendkeys a non option.
Any ideas????
View 5 Replies
View Related
Mar 13, 2008
I am using an active x control that when you right click on it, it automatically pops up an "About" box showing information about the control. I wouldn't object to this, but I need to use the right mouse down event for another purpose in my program. So far I have discovered that the code I put in the the event works, but only after the "About" box pops up. Is there anyway to cancel or prevent the popup? The reason that I need the right mouse down event is because is that I am already using the left mouse double click event, and I can't use the left mouse down event because then it always fires before the left mouse double click event. This control doesn't have any single click events. Ideas?
View 2 Replies
View Related
Feb 9, 2005
I have a form on which I have a button that I want the user to click after a cetrain field on that form is updated.
I display a little pop-up box saying to make sure that a user clicks on that button.
Is there a way to know that this button was clicked? Is there a way to not proceed with anything else until that button is actually clicked?
Thanks.
View 4 Replies
View Related
Sep 19, 2005
Hi,
I have a form with a number of drop-down lists on it and each of these lists is bound to a field in a table.
When I return the results of a search to this form I want to allow users to be able to cycle through the records and change them if they want. However, the changes should only be saved if the user clicks on the "update record button". This button is simply the save record button by the MS Access wizard.
At the moment if they change the value in one of the drop down lists and move onto the next record the change is saved even though the user doesn't click any button. I want to prevent this from happening.
Any ideas on how I might achieve this?
If I prevent "AllowEdits" in the form properties I can't update the form using the "update record button" either.
Many Thanks,
View 2 Replies
View Related
Nov 10, 2005
Afternoon people,
Just a query (no pun intended). Is there a way to ping an ip address which is taken from a table and at the click of a button it pings? Bringing up the cmd app to show the results.
Cheers,
Storm1976
View 1 Replies
View Related
Nov 22, 2005
I currently have a form with a button that once clicked displays a word document,however I have to double click on the button even though the code is on the single click event property.The only line of code is as follows
OLEFile.Action = acOLEActivate
Does any body know how I can get the single click to work ?
View 2 Replies
View Related
Sep 6, 2006
Hi all....
I have a list box that I can select mulitple items from - I then click a search button and it runs a query that finds what I am looking for from a table and then displays the results in a subform.
In the subform I can input weights and get a percent....anyhow.
How do I set up a button so that it will print out a report or the report from the subform information that is currently being viewed.
Also, I can already do this by clicking a button on the form and pulling up the installed report program but, you need to input data to get this report.
I kinda want this button to be a "I need it now" type of print option.
Thanks...as always my questions are probably confusing...:D
View 2 Replies
View Related
Sep 7, 2006
I was wondering if there is any way to control a user's input in to a form such that data entry does not automatically create a new record. Is there any way to collect all inputs in the text/combo boxes and create the new record only when a button is clicked? Cheers, David.
View 1 Replies
View Related
Aug 13, 2013
I have a simple application where a user clicks on the name of the person he wants to update from a drop down box.
The record is then retrieved and the fields are filled on the form.
The user will then enter a value in the # in household field.
The user is then required to click on the save button to write the record for this person.
I do not have strong users and they invariably forget to save the record and go on to the next person, resulting in the record not being updated.
I coded a message box as part of the save button which displays "person was successfully updated" and then instructed the user to make sure that they see this message before they go on to the next person. They still fail to update correctly.
My question:
Is there a way when the user selects a person from the drop down box and it is loaded on the form, to warn the user that they have NOT updated this person, before they go to the next person?
I don't know what else I can do with these users. They are all volunteers and elderly and the application is for a Food Pantry.
View 4 Replies
View Related
Jul 5, 2006
Hi there!
This is a question that you might scratch your head while reading, but what the hell... :-)
Imagine a form with 4 blank textboxes (name, input1, input2, input3). When you add the value in the textboxes, the value in the table changes as you write. Instead I only want the values in the table to be added once an "OK" button has been pressed.
When the button is pressed I want the current date written in a field called 'date' and the inputs from the 4 textboxes added to fields with the same name...
How is that done???
John
View 5 Replies
View Related
Aug 9, 2005
Hi all!
I have this command button whose caption switches from update record to save record with a msgbox verifying if the person really wants to take this action. On click the user is then allowed to update the record then in theory they would be able to hit the same button whose caption now reads save record, the msg box would appear with a yes or no answer required. The code I have is putting the msg box after the user clicks the update button.
Anyhelp and/or suggestions would be most appreciated!
Private Sub cmdOpen3_Click()
stDocName = "frmSearch"
If cmdOpen3.Caption = "&Update Record" Then
If IsNull(Me.FTMSubform.SourceObject) = False Then
Me.FTMSubform.SourceObject = "frmFTMInfo"
Me.FTMSubform.Form!txtFirstName.Enabled = True
Me.FTMSubform.Form!txtFirstName.Locked = False
Me.FTMSubform.Form!txtFirstName.BackStyle = 1
Me.cmdOpen3.Enabled = True
Me.cmdOpen3.Caption = "&Save Record"
Me.cmdOpen4.Enabled = False
Me.cmdOpen4.Caption = "&Update Record"
Else
Me.FTMSubform.Form!txtFirstName.Enabled = False
Me.FTMSubform.Form!txtFirstName.Locked = True
Me.FTMSubform.Form!txtFirstName.BackStyle = 0
Me.cmdOpen3.Enabled = False
Me.cmdOpen3.Caption = "&Save Record"
Me.cmdOpen4.Enabled = True
Me.cmdOpen4.Caption = "&Update Record"
End If
End If
If cmdOpen3.Caption = "&Save Record" Then
If IsNull(Me.FTMSubform.SourceObject) = False Then
Me.FTMSubform.SourceObject = "frmFTMInfo"
If MsgBox("Save update to this individual?", vbQuestion + vbYesNo, "Save Update?") = vbYes Then
DoCmd.Save
DoCmd.Close acForm, "frmFTM"
DoCmd.OpenForm stDocName
Else
MsgBox "Return to the FTMInfo Form!", vbInformation, "Save Function Aborted!"
End If
End If
End If
End Sub
~Van
View 2 Replies
View Related
Oct 26, 2005
Adding Records Only On Button Click?
I am building a database with a single table of records. I have created a form to allow new entries to be made to the table in a user-friendly way.
The problem I’m stuck with is how do I restrict the addition of new records on the form? I want the new record to only be added to the table upon the click of a button, but at present if I tab through, or exit the form the record is saved anyway.
Not all fields on the form are required input so I’m thinking that validation of every field is not the way to go.
I only ever want the record to be saved if a user clicks on a button and under no other circumstance.
I've been trawling through the posts back to about page 15 so any help would be appreciated.
Ksan
View 4 Replies
View Related
Feb 6, 2006
Hello everyone!I need to call the button_click procedure for a button on a form (button1), from another form, if you see what I mean!.Basically the user opens form1. They click a button which opens form2. Once they have finished on form2 they press the close button, which is the point where I need to call the button1_click procedure on form1.I imagine it's something like this:Call Forms![frmForm1]![button1]![Click] orCall Forms.[frmForm1].[button1_Click()]But no matter what syntax I try it just won't work! They're very basic forms, with only 2 buttons on and basic commands.Any help appreciated! Thanks
View 5 Replies
View Related
Mar 16, 2006
How can i deactivate mouse second button click on form?
Can anyone help me please?:)
View 1 Replies
View Related
Sep 27, 2013
How to add new record by using vba or sql once click a button?
View 1 Replies
View Related
Sep 24, 2013
I try to run a function off of a button click.
The code is
Private Sub Command_Click()
Run fuctionname()
End Sub
The code is ran, but then I get a msg box : Run-time error '2517':
Microsoft Office Access can't find the procedure '.'
View 5 Replies
View Related