Thanks for the help. I was able to get my code to work by placing the data from the existing form as default values in the form I open. However, I still can't understand why I get an error saying it "expected an array" when I try to use "Option Explicit" in the above posted on open code. I read the article NeoPa listed but I can't put my finger on the problem in my code.
Please help.
Thanks...
User Profile
Collapse
-
Pass data from original form to new form
Hi,
I have a form from which I open another form unsing the after update of a field I want to pass data from four fields of the original form to for fields of the newly opened form. I keep getting an error saying you can't assigne a value to this object.
My after update is
Code:Private Sub Officer_LostFocus() If Me.Dirty Then Me.Dirty = False Dim stDoc As String stDocO
-
-
I got it !!!!!!
Wierd but I used your code for line 9 and changed lines 2 and three to string as follows:
Code:Private Sub SPBI_BeforeUpdate(Cancel As Integer) Dim SID As String Dim stLinkCriteria As String Dim rsc As DAO.Recordset Set rsc = Me.RecordsetClone SID = Me![SPBI] stLinkCriteria = "[SPBI]=" & SID 'Check
Leave a comment:
-
-
SID is an integer that under field size is set for double. Do I have this formated wrong?Leave a comment:
-
Help with changing from string to double
The following codes works when Lines 2 and 3 are strings but when I change them to doubles it does not work. I believe my error lies in line 9 but I need help in fixing it.
Thanks
Dan
Code:Private Sub SPBI_BeforeUpdate(Cancel As Integer) Dim SID As Double Dim stLinkCriteria As Double Dim rsc As DAO.Recordset Set rsc = Me.RecordsetClone SID = Me![SPBI]
-
-
-
How can I make this filter work
I have a command buttton on a form that calls a report and filters the report as follows:
Code:Private Sub btnLetter_Click() Dim strSQL As String Dim stLetter As String Dim stFilter As String DoCmd.Close stLetter = "rptParkingLetter" DoCmd.OpenReport stLetter, acViewPreview stFilter = ("Letter2Sent Is Null And InDispute = No And Closed
-
-
Exit subform to main form
I have a subform named frmPackingSubEn try with one field in it called packingId. This subform is in a form called frmPacking. I would like to be able to tab out of the subform field and into the field PackingDate of the main form. Can I do this using AfterUpdate? and How?
Thanks for any help -
Thanks for taking the time on this, I really appreciate it. DOes the change you show increase performance or is it another way. I am trying to lrearn.
ThanksLeave a comment:
-
That's it! Thanks
I got it to work by adding mega code to line 10 and changing my code to read as follows:
Code:Private Sub FilterOvertime_Click() On Error Resume Next Dim strSQL As String, intCounter As Integer Dim c As Access.Control 'Build SQL String For intCounter = 1 To 2 If Me("Filter" & intCounter) <> "" Then
Leave a comment:
-
opps I ment I need to change just lines 9 and 10 to make it work
ThanksLeave a comment:
-
How do I format sql for number?
I have the following code and it works with characters I want to change lines 9, 10 and 11 to work with a number. How do I format it to work?
Code:Private Sub FilterOvertime_Click() On Error Resume Next Dim strSQL As String, intCounter As Integer Dim c As Access.Control 'Build SQL String For intCounter = 1 To 2 If Me("Filter" & intCounter) <>
-
I got it!! Apparently it is case sensative when it comes to the printers name. Thanks everyone.Leave a comment:
-
Ok I got part of it. When I change it to a local printer it works but when I cahnge to a network printer it does not. Any ideas why?Leave a comment:
-
I have all the latest updates and my printer name is correct any other ideas?Leave a comment:
-
I tried what you said and it did not work. I get the same error and when I click debug it highlights line 9.Leave a comment:
No activity results to display
Show More
Leave a comment: