subform not loading before main form

Hi

MS Access 2003 SP2

After I did some refactoring of the subform code, the subform just
would not load. In fact, it skips the subform without any error, and
fails to load the main form as the main form depends on the subform
for some data.

My problem was

Private Const START_DATE as Date = "#00:00:00#"

I had accidentally added quotation marks around the date literal.
Since it was not throwing an error it took me 2 days to track down
this simple mistake.

Hope others won't have to waste so much time!

Riyaz

0
riyaz
5/7/2007 3:09:49 AM
access.forms 6864 articles. 2 followers. Follow

1 Replies
1540 Views

Similar Articles

[PageSpeed] 26

Compile
---

Hi Riyaz,

"Since it was not throwing an error it took me 2 days to track down this 
simple mistake."

If you compiled your code, the compiler would have caught this error -- 
given you a "type mismatch"

'~~~~~~~~~ Compile ~~~~~~~~~

Whenever you change code or references, your should always compile 
before executing.

from the menu in a module window: Debug, Compile

fix any errors on the yellow highlighted lines

keep compiling until nothing happens (this is good!)


Warm Regards,
Crystal
  *
      (:  have an awesome day  :)
   *
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
   *



riyaz.mansoor@gmail.com wrote:
> Hi
> 
> MS Access 2003 SP2
> 
> After I did some refactoring of the subform code, the subform just
> would not load. In fact, it skips the subform without any error, and
> fails to load the main form as the main form depends on the subform
> for some data.
> 
> My problem was
> 
> Private Const START_DATE as Date = "#00:00:00#"
> 
> I had accidentally added quotation marks around the date literal.
> Since it was not throwing an error it took me 2 days to track down
> this simple mistake.
> 
> Hope others won't have to waste so much time!
> 
> Riyaz
> 
0
strive4peace
5/10/2007 1:37:49 AM
Reply:

Similar Artilces:

subform in subform
Hi, I've got a form F and subform S1 in it. And inside S1 I've got subform S2. How do I reference a text box in S2 from VB code? thanx alek_mil Try: forms!F!S1!S2!textbox That should do the trick -- Maurice Ausum "alekm" wrote: > Hi, > I've got a form F and subform S1 in it. And inside S1 I've got subform S2. > How do I reference a text box in S2 from VB code? > thanx > > alek_mil You might find this useful as well... http://mvps.org/access/forms/frm0031.htm -- Jack Leach www.tristatemachine.com &q...

How To Stop Acces From Update The Record When The Subform Query Is On Focus?
Hi I need to know how to stop acces from update the record when the subform query is on focus? Thanks In news:1177155216.699820.268130@d57g2000hsg.googlegroups.com, Chipcom <bz1977@gmail.com> wrote: > > I need to know how to stop acces from update the record when the > subform query is on focus? If you mean that you want to keep the main form's record from being saved when the subform gets the focus, the only ways you can do that are: 1. Have the main form be unbound. In that case your own code has to do the job of reading the record, assigning its field values to ...

Combo values from query based on form fields
I am setting the values for a combo box in a form(s) via a query that 'filters' the results with criteria based upon the values of other fields on the form. The combo is a field that is bound. However, this is giving all kinds of problems ranging from Access completely crashing to being asked for the parameter values of those criteria fields when closing the form. I have tried making the combo an unbound field and then setting the value of the bound field to that unbound field after update, but that still leads to the same issues. How can I do this? As example - I have a form w...

Optimize Exchange 2003 for large mail loads
We have exchange 2003 on a windows 2000 machine configured with basic default settings. It is in a domain setting and we have people that use outlook to pull mail from the server. These individuals receive about 1000 mails a day. When gone to lunch, there are about 2-3 hundred mails when they return. The problem we have is when they log back on and try to pull mail from the exchange. The outlook crashes. When they pull smaller groups of mail through out the day, they are fine. There are only 4 people here that receive mail like this and we've up the memory on the computers...

filter form by listbox selection
Access 2003 form called fGua has an unbound list box called lstComponent. When the user selects from the listbox how can I make the form filter by that selection Private Sub lstComponent_AfterUpdate() Select Case lstComponent.Value Case "CT" 'CT Me.Filter = "[Component] = [lstComponent].value " Me.FilterOn = True Me.Component.DefaultValue = """" & Me.lstComponent.Value & """" Case "ST" 'ST Me.Filter = "[Component] = [lstComponent].value &q...

Automated task to present data in a graph form.
Hi, I am newbie to Excel area. I got a requirement where in I need to present the Excel sheet data with 3 columns in a graphical form. Everyday, the excel sheet is populated with the current data. This is automated from the backend. I want to know whether there is any possibility of a macro which draws a graph with the data present in the excel sheet. It should be an automated task. Thanks for the help in advance. -- luckyguy ------------------------------------------------------------------------ luckyguy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=285...

Textbox Information to Subform
I have a subform that I need to contain information from a main form. The sub form is linked by studentID, but I also need the tardy ID, TardyID, to populate the subDhall field txtTardyID. I tried the AfterUpdate of TardyID with this: Me!subDhall.txtTardyID=Me!frmTardyAdd.TardyID and Me!subDhall.frmTardyAdd.txtTardyID=Me!frmTardyAdd.TardyID to no avail. Anyone have any tips? -- Thanks As Always Rip "Ripper" <Ripper@discussions.microsoft.com> wrote in message news:753FE132-F478-4952-ABEE-EA884BB75A19@microsoft.com... >I have a subform that I need to contain informat...

Outlook 2003 Sharing Forms
Hi: I created a new Task Form and need for others on my team to be able to send it out as well. When I send it to other team members they are not bale to see the tabs or required fields on the from. Is there a simple resolution? Thanks. Try this page:: http://www.outlookcode.com/article.aspx?id=34 -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scratching, Future Date Emails asked: | Hi: I created a new Task Form and need...

Want to load MSPublisher97 on my laptop running windowsXP. Error.
I'm running Windows XP Home on a Sony VAIO Laptop with Pentium 4 processor Tried to load MSPublisher97 and got the message that it would not load.. the exact wording of the error message is: C:\WINDOWS|SYSTEM32\AUTOEXEC.NT. The system file is not suitable for running MS-DOS and Microsoft Windows applications. Choose "Close" to terminate the application. Any help would be appreciated... I really don't understand since I'm also using MS Office97 and it loaded just fine! Puzzled! Dave Perkins daveylee@daveylee.com Some things to try Disable your virus software...

Subform of a subform?
Is there a way to create a two subforms (sub1 and sub2) on one main form, but have the second subform (sub2) actually be a subform of the first (sub1)? ...

Open Form Button
OL 2007 Can I add a button to the menu bar to open a specific form. Thanks What type of form? An Outlook form? -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scratching, PapaFrank asked: | OL 2007 Can I add a button to the menu bar to open a specific form. | Thanks Sorry an Email Template .oft stored in userstemplates in file system. "Milly Staples [MVP - Outlook]" <what@ever> wrote in message news:OeV...

Find record created in form load
There may be many thing wrong with this, so I apologize from the start. I have one form that builds the reference number, and I want to transfer that and other information to the Main Input Form, and then move to that record in the Main Input Form. Right now, the form opens to the first record. I have the following in the Form_Load event: Private Sub Form_Load() If Me.OpenArgs = 1 Then DoCmd.GoToRecord , , acNewRec [Issue Entry Date] = Now() Me.Issue_Reference_Number = Forms!frmnewissue_setup.Text5 Me.division = Forms!frmnewissue_setup.Combo3 ...

Subform with Macro
I have a form (frm_BinDetails), within this form I have a subform (frm_Cable). frm_Cable has a listbox (List23) which when the user clicks on an entry the contents of the first column of that listbox are displayed in a textbox (txt_ProcessID). The on click event of the listbox runs a macro with the following code Action = SetValue Item = [Forms]![frm_Cable]![txt_ProcessID] Expression = [Forms]![frm_Cable]![List23] When I run the form frm_Cable on its own the macro works correctly but when I try and run from frm_BinDetails then whenever I click on an entry an error message appears saying th...

Load Arabic character from Ansi file #2
Dear All, I am currently devoloping an _Unicode application using vc++ 8. I ask if anyone can help me, because I am using Ansi text files which store Arabic Text. This text can't be inderstood when I load it for example in a richedit. like this string "=C7=E1=E4=C7=D6=E6=D1". Best regards. If you have to use 8-bit text files, use UTF-8 encoding. Then convert the text to UTF-16. <mohamed.mzid@gmail.com> wrote in message news:1148240118.795169.21330@j55g2000cwa.googlegroups.com... Dear All, I am currently devoloping an _Unicode application using vc++ 8. I ask if anyone...

macros on a form
hi we have a workbook containing serveral worksheets each worksheet contains a lot of data we have split each worksheet into three pages for print purposes what we want to do is have a form containing drop down list of names we need each name to select and run a macro can this be done? thanks in advance kevin Kevin Carter Sigma Machining XL and VBA are capable of a lot. From the generic description of the problem, I would say yes. -- Regards, Tushar Mehta www.tushar-mehta.com Business solutions leveraging technology Microsoft Most Valuable Professional (MVP) 2000-2004 In art...

opening a subform to a specific record?
Hey y'all, I've got a form that lists all the Students in a class and a link to "Edit Student Information" which opens a form to edit individual records. The link uses the same type of code generated by the form wizard and it automatically filters the records to the class. The next thing I want to do is to open the new form to exactly the record that was highlighted in the list. I can capture the list position from the subform (SelTop) and I found a method called "GoToRecord" that works like this to go to the 8th record: DoCmd.GoToRecord acDataForm, "Studen...

Get Subform Data
I'm looking for a way to get the data from a chosen record in a continuous subform. I have a customer form and a continuous subform with all of the charges associated with the customer. Is it possible to have a button on the form, prompt the user to highlight a record (the charge info.) in the continuous subform and get the information about the charge? If there is not a way to do this, I'm pretty sure that I can achieve what I want to do via a list box. Open the subform in design view, and set its Record Selectors property to Yes. (This is a property of the Form, not o...

Find and History on form
Hey, I am trying to do a form that has several buttons on it. next, previous, print, find, spelling and history. I've done most of them with macros, but I don't know what to do to make the Find and History buttons. Can someone help me? ...

How to email directly from publisher a document in the main body .
I am tring to email a flyer that I constructed in publisher. I do not want to send it as an attachement What version of Windows, Publisher, Outlook and Outlook Express are you using? -- Brian Kvalheim Microsoft Publisher MVP http://www.publishermvps.com This posting is provided "AS IS" with no warranties, and confers no rights. "boxtteri" <boxtteri@discussions.microsoft.com> wrote in message news:E25049D9-676C-4ACD-8B6E-DFD83CB04267@microsoft.com... >I am tring to email a flyer that I constructed in publisher. I do not want >to > send it as an attache...

Using Form to input multiple field to table at once
In this simplified exampe, I have 2 tables Table#1: Students with field <Name> Table#2: Attendance with fields <Date> , <Name> and <Present/Absent> which is a checkbox to be checked if present. I would like to make a Form which generates a tabular list of all student pulled from the "Students" table so that I can then click the check box next to each students name that is present on a given day. I would also like one input field on the form to input the date only once Then, I would like to be able to click a button to have form update m...

User Form
Hello, Anyone who can help me with this problem/error in Excel 2000. System Error &H8007000B (-2147024885) An attempt was made to load a program with an incorrect format. Error was encountered when trying to Insert a UserForm. Excel --> Tools --> Macro --> Visual Basic Editor --> Insert --> UserForm Appreciate any assistance. Thanks. ...

Printing a single record from a tab control subform
Hi I have created a Case Management Database of students. It consists of a main form and a subform. The main form consists of information that must be seen at all times. since it consists of information about each student. The subform consists of a tab control. There is a different subject on each page of the tab contol, e.g. General Information, Current Student Information, etc. I need to print out the mainform and subforms so I created reports for each subform in my tab control. I want to put a "Print" button on each page of my tabcontrol so that when cl...

Different Contact forms in the one deployment
A client has a need to use different forms for two separate divisions, as they use very different terminology. Is this at all possible in one Server deployment? Understand you could have two deployments, but they need to be able to amalgamate the information. Has anyone had any experience or ideas with this? Any help on the best way to go about this would be much appreciated. Many Thanks Cathy Cathy, I don't think this is currently supported. One workaround might be to use a tool like Virtual Server and run two instances of the CRM front end on the same machine. There are a f...

Custom Forms
Our management is thinking about using Outlook to have contact data that is shared and synchronized with our sales personnel in the field using custom forms. What they have in mind would require custom forms that can deal with a master/detail type of relationship like you would have in an app tied to a relational database. Can Outlook custom forms even do this? I have not found any examples sounding remotely like this sort of thing. TIA -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com Outlook itself is not a relational database and, t...

Code to duplicate data from one subform to two other subforms
This is my first database so I hope I am able to talk the language well enough to get help. I have a form with three subforms. The 1st subform is titled Service Record subform and has fields for Department, Job Title, Date In, Date Out, and Time Served. The 2nd and 3rd subforms are Department Service and Job Title Service. I would like to be able to enter an employee's information in the 1st subform and have it populate the 2nd and 3rd subforms. I am wanting the Department Name along with time served to populate the 2nd subform and the Job Title Name and time served populate th...