Howdy, Ok, I did a search of the forums, and couldn't find an answer. I have a feeling that the answer is either here or on the net somewhere, so if someone could point me in the right direction, I'd be much obliged.
I have a DB that tracks clients attendance. The clients are refered to us via the County. When the county refers them to us, they have two days to contact us. What I need is some way to enter the clients info when I get the referral, and then have some sort of pop up reminder two days later to see if they contacted us.
Also, what is such a function called? that way I can do a better search for it :p
I have code for a button click event. Essentially I have a main table form that I use to enter customer data and info. I also have a button that I use to add that customer to a separate table that I use for special Customers. My code copies all the data I need copied to my other table, so I wont waste space here typing my code that actually copies the data to the new table. What I will list are the two commands I am using after that code, to close the current form (the one with the button) and open the form for entering special customer information (the form to edit data on my other table). It works flawlessly, but when it opens the other form, it opens to the first record. I want to know how to make it open to the record which I was viewing when I clicked the button to copy the data.
DoCmd.OpenForm "Special Customer Data Entry", , , Number = Me.Number DoCmd.Close acForm, "Customer Data"
hi , i am new to access ,specially in designing forms . I have two tables Table1 and Table2 .I have created forms ,Form1 and Form2 respectively. now what i want is ...when i enter the value in Form2 ...Table1 filed should be updated. Table1.field1=Table1.field1-Table2.field1 how can i perform this type of action ?
End Function ````````````` What I am trying to get to is to have the text box event...Private Sub Text0_AfterUpdate() ...... Be a Form event... So the code would apply to every text box on the form. Tried it on different form events..... Cant get it to work. Any ideas????
I'm having troubles understanding and picking the right event for a particular action in forms. For example I want to set the background of a form to "15911239"; which event do I pick? I know that Oncurrent will work but I don't neccessary want to "set the color" whenever the record changes, because setting it once would be enough. However, onOpen gave me an error (i guess the form isn't open yet, while I'm trying to give it a color). OnActive? Some light on this matter would be appreciated and an answer to the above example would help too.
I would like a form I have created to check the value of a text box upon loading the form and also everytime the form loads the next record. Is there an event setting for this? Thank you in advance.
I'm trying to open a form based on another form and have the following code in the Open Event:
Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_FormOpen Dim strForm As String
strForm = "frmProductionBatch" If IsLoaded(strForm) Then Me.ProductName = Forms![frmProductionBatch]![ProductName] Me.BatchNum = Forms![frmProductionBatch]![BatchNum] Else End If
Exit_FormOpen: Exit Sub Err_FormOpen: MsgBox Err.Description Resume Exit_FormOpen
End Sub
It works however I get an error message stating that I cannot assign a value to this Object? What is going on here?
I have a field (AR#) that has an "on change" event. This is supposed to check through the database and see if that number has been here before (it's like a job # / serial #). It had always worked fine - now suddenly this field, and this field only, reacts VERY, VERY slowly when you type a number in. You can type the number and wait about 5 seconds for it to show up. When I removed the event - it acted normally so I think it has to do with that. Here's the vb for the event:
Private Sub AR__Change() Dim db As Database Dim Rst As DAO.Recordset Dim strAR As String Set db = CurrentDb() strAR = Me.AR_.Text Set Rst = db.OpenRecordset("repairs", dbOpenDynaset) Rst.FindFirst "[AR#] = '" & strAR & "'" If Rst.NoMatch Then Else MsgBox ("This value it is already in the system !") End If End Sub
Any ideas why it's reacting so slow or what I should look for?
Is there a way to cancel a form's close event? If a user clicks the form's close button, I want a msgbox to ask if they are sure, and if yes continue and close, else cancel the forms close event. I know how to perform the msgbox and the if statement. I can not figure out how to cancel the form's close event.
I'm using Access 2K. I have created a Form BeforeUpdate event to check that certain fields in the form have been filled. However, I don't want to do the check until after a subform entry is also complete, but the BeforeUpdate event fires as soon as the subform is entered. Is there any way I can around this?
I created an Event Procedure on the After Update event for a control in a continuous form. Basically, if certain conditions are met, I want it to disable another control. It works perfectly, except it is disabling the controls for all the records instead of just that record.
Does anyone know how to get it to just update that record? I've been researching and cannot figure it out!
I have a continuous subform that shows 2 records consisting of a text field and a yes/no field. I was wondering if it was possible to take the state of one particular of the yes/no fields to trigger an event. Specifically, when one of the questions is checked [true] then I would like to make visible another subform on the main form.
Can this be done, and if so, how, or should I just leave my subform visible at all times?
I have a form with a subform. In the form's On Current event I have the subform's visible property set to false. There is a button that when clicked sets the subform's visible property to true. I want the subform to go to the first control in a new record which is a combo box. the subform is a multiple items form. I have tried the GoToControl in the subforms OnCurrent event, but it is not working. I get an error saying the database cant find a third form.
I have On Load, Current, After Update events on a form, which all work fine. But, when I add a Before Update, I get the error: "Procedure declaration does not match description of event or procedure having the same name". Following is my code:
Code:
Private Sub Form_Load() If InStr(Me.Filter, "=") > 0 Then If IsNumeric(Mid$(Me.Filter, InStr(Me.Filter, "=") + 1, Len(Me.Filter) - InStr(Me.Filter, "="))) Then Me.Tag = (Mid$(Me.Filter, InStr(Me.Filter, "=") + 1, Len(Me.Filter) - InStr(Me.Filter, "="))) End If End If
I have a main Part form and a Spec subform linked via Part key.
I need to add 6 Spec records automatically when a new Part is added so user can select desired Specs (default value is "n/a" for al 6 entries).
Right now I have the Spec entries added in AfterInsert for Part form, but I have to navigate out and back into record to trigger Part insert. I cannot add the Spec entries until the Part entry is added.
Is a command button my only option? Or is there another way?
AfterInsert is too late, and BeforeInsert is too early; that gets triggered as soon as the first character is typed in Part name.
I have an order form with an order details sub form. Both are bound to their respective tables and function correctly, with the OrderID being inserted automatically into the order details table.
However I am using VBA to update and check stock and have it working when attached to a separate form called process orders. Which event would be the best place to place this code. I do not really want to have the process orders form. Would it be on the master form or the sub form. I thought of placing it in the after insert event on the subform, but there can be many order items per order and it will run before I have finished adding order items. I tried it in the after insert event on the master form, but I think that this will run the code too soon as at this stage the order details will not have been written to that table.
I've taken a break from Access for a while, but I'm back at it again and having some difficulty. I am trying to open a form with a timer to state that the database is going to shut down in five minutes if they don't respond. I'm obviously using the wrong code. I've been trying to use the following:
Private Sub Form_Timer() DoCmd.OpenForm "frmWarning" If Forms!frmHidden!chkActive Then Forms!frmHidden!chkActive = False Me.TimerInterval = 300000 Else DoCmd.Quit End If End Sub
I have a form in which job times for individuals is entered. As the data is entered, a macro fires to calculate various costs (Nat Ins/Pension/Total cost etc etc), and that data is stored in a table.
I now have written code to enable the inputting of the data into the database directly from the Excel sheet in which the data is first entered - this is great as it cuts out a data entry repeat and will be a big big time saver.
I want to call the "On Current" event of another form.
I have a parent(mainform) form and then I have a subform(CurrentForm) and in that subform(CurrentForm) I have another subform(mysubtab01). From the mySubTab01, I want to call the On Current of the parent form. How can i do this?
This is an example of how I am setting the record source of the deepest subform where I want to call the parent on current from:
Forms(mainform)(CurrentForm)(mySubTab01).Form.Reco rdSource = "Select * from subQrytab03"
I have parent form and child subform. one field in the parentform is calculated on sum of records on the childsubform when the parent form loads initially the value in the calculatedfield is 0 then it shows the correct value when the childsubform value is populated i have another-field i want to change the property of the onotherfield.backcolor= RGB(0,0,255) when calculatedfield.value<0 but its taking the initial value(0) not the calculated onewhich event shall i invoke on the form so that it waits the subform to complete then fires ... i tried current, load, activate events .. with no success.