473,326 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

No error warnings

I have a situation that never occured in access 97 and Im really stuck as to where to find the solution, in the reports and forms I have set various variables, and control parameters via the coding area, I totally check that the form has to be completed, but as with some of the reports, if there is a problem, i.e. a control mentioned in the code that is not on the form, or if one of the controls is not activated my save button has no reaction at all and at times doesnt write the record at all. please help if u can - error checking is ticked fully in options. The save button simply checks the controls have been entered correctly and then closes, i open a new record to the table on current to the form.
Dec 1 '06 #1
24 2132
NeoPa
32,556 Expert Mod 16PB
Can you post the code you have in the relevant Event procs.
I'm not sure what this is - it may be code related - but it's possible it's not Access related at all (maybe a glitch elsewhere). Try to explain clearly the circumstances under which the problem occurs too as this could also help.
Dec 2 '06 #2
Thanks for your reply, at its simplist form i have a report that displays a field / control and in the code on format I check to see if the control is > 0, if not visible = false else visible = true, if I delete the control from the report design and try to run the report the screen simply flashes as if it tried to run but no response, as soon as i re-instate the control - all ok, im sure that 97 gave error messages if control did not exist.
Dec 2 '06 #3
Just trying to sus this, I have these lines in code of report

Me![stabelheight].visible = True
Me![stableheight] = me![stable] + 30

as you can see spelling on 1st line incorrect - this gave no warnings or error, this type of error could take me an age to find if I have a lot of code

Any clues please
Dec 2 '06 #4
NeoPa
32,556 Expert Mod 16PB
Do you run 'Compile {project name}' from the Debug menu when you're ready to test your code?
This should be found in a compile.
Otherwise I don't know what your problem may be.
Dec 3 '06 #5
Yes, aplying comply action, I have also found that when I write a new record in a form and the table#1 im writing to has a relationship with another table (needs to be corresponding record value in table#2) then no error warning, just doesnt write the record.

I have tried just in table design and i get 'Cannot add or change a record because a related record is required in table#2'
Dec 3 '06 #6
NeoPa
32,556 Expert Mod 16PB
It's a long shot, but try typing DoCmd.SetWarnings(True) in the immediate pane of the VBA window (Ctrl-G), then trying again to see if error message shows. If that doesn't change anything then I'm stumped.
Dec 3 '06 #7
I really appreciate your patience with this problem, ive tried what you have suggested - no good - but again thanks for your efforts, I have reinstalled 2003 just in case, converted file to 97 and error appeared, but don't want to go back to 97 cuz of this. If you get any future solutions to this problem i will be gratefull and again thanks for your input.
Dec 3 '06 #8
Thought I would let u know for future ref : opened new DB and inported all tables, queries, forms, reports and macros and error came back, must have been glich in current db, again thanks for your advise and support,
Dec 4 '06 #9
NeoPa
32,556 Expert Mod 16PB
Thought I would let u know for future ref : opened new DB and imported all tables, queries, forms, reports and macros and error came back, must have been glich in current db, again thanks for your advise and support,
Did you mean the error came back or it's now solved?
Otherwise why assume glitch in the database... Just curious you understand.
Dec 4 '06 #10
Expected error messages warned me of problem , the original DB was giving me no clues of errors - it seemed that error checking wasnt working, all solved now, thanks for your feedback - gud to know there are people willing to help - great forum.
Dec 5 '06 #11
NeoPa
32,556 Expert Mod 16PB
Thank you.
Always nice to get feedback - positive feedback is best :).
This does sound like the problem I was trying to fix in post #7 though.
Did that not work for you? I was hoping it would allow more info from Access.
Dec 5 '06 #12
#7 suggested typing DoCmd.SetWarnings(True) in the immediate pane of the VBA window, this didnt solve the fact that i didnt get any warning. just wondering if i spell a control name wrong in code ie i spell me![name] as me![namr] by mistake - should the compile find this, it doesnt when i try it but when i run the report then the wrongly spelled control is found (this was basically the type of problem i was experiencing) access was not warning me that i had typed a control wrong in the code.
Dec 5 '06 #13
NeoPa
32,556 Expert Mod 16PB
Ahh.
Did you compile it (explicitly - Debug / Compile {project name}) or just try to run it after updating the code?
Dec 5 '06 #14
I did it expicitly, the way i solved the problem was to create db1 and simply import 1 table and 1 report (the report with a control spelling mistake) and then tried to run and in new db1 i got expected error whereas in old db nothing - do you get a compile error if you compile {project name} when you have typed a control in wrong - im just curious you see.
Dec 5 '06 #15
NeoPa
32,556 Expert Mod 16PB
Only if the compiler can determine what you're referring to.
If the code is in the form's module itself it can check.
Otherwise it can only check if you refer to the control using the format :
Form_{FormName}.{ControlName}
EG I have a form called frmMain with an exit command button on it called cmdExit.
That would be Form_frmMain.cmdExit.
If my code included Form_frmMain.cmdEcit then the compiler would find it.
If my code included Forms!frmMain.cmdEcit then the compiler would probably not find it.
Dec 6 '06 #16
how about Me![formname]
Dec 6 '06 #17
NeoPa
32,556 Expert Mod 16PB
how about Me![formname]
Me![formname] doesn't make sense.
Me.FormName is the name of the current form but [FormName] would have to be a variable of some sort with a value matching the name of a control or property of the form for Me![Formname] to work.
Dec 6 '06 #18
Sorry my mistake i meant me![controlname], long day
Dec 6 '06 #19
NeoPa
32,556 Expert Mod 16PB
Sorry my mistake I meant me![controlname], long day
You're not wrong there :)
The simplest way is to try it out, but I did that on my database and it complained at compile time.
I have 'Option Explicit' set which I think is critical.
Dec 7 '06 #20
MMcCarthy
14,534 Expert Mod 8TB
Sorry my mistake i meant me![controlname], long day
To avoid the problem. Type Me. and wait for the list to drop down then select the appropriate control name. This will prevent spelling mistakes.

Mary
Dec 7 '06 #21
Thanks - great tip, i wonder if you could identify the dirrerence between.

me!
me.
when do you need to bracket the control name [control]

when does forms!control or forms.control need to be used.

i get confused as to whether these are interchangable or is there a syntax for different situations, not really after answers to all - but maybe just a pointer to where there is an overview of the differences - if any.
Dec 7 '06 #22
NeoPa
32,556 Expert Mod 16PB
The external syntax (code running from outside the form itself or one of its subforms) for this is :
Expand|Select|Wrap|Line Numbers
  1. Forms![FormName].[SubFormName].Form.[ControlName]
  2. or
  3. Forms("FormName").[SubFormName].Form.[ControlName]
Where :
FormName is the name of the main form.
SubFormName is the name of the Sub-form control on the main form in which the actual sub-form is contained.
ControlName is the name of the control that you want to refer to.

You will often see (!) used instead of (.). In most cases it's not a problem as Access will interpret it as a (.) if object it refines is not a collection.

Example to refer to a subform's txtJobNumber control :
Expand|Select|Wrap|Line Numbers
  1. Forms!frmFieldServiceDatabase.[qryReviewJobs subform].Form.txtJobNumber
  2. or
  3. Forms("frmFieldServiceDatabase").[qryReviewJobs subform].Form.txtJobNumber
[] are always acceptable indicators that you are referring to something by name. Field names; control names; etc.
They are necessary when the interpreter (either VBA compiler or SQL engine) would find the name ambiguous or invalid.
Embedded spaces or other non-standard characters are one reason. Reserved words are another.

Refernencing using (!) this is used as short-hand code for Parent("Name").
Expand|Select|Wrap|Line Numbers
  1. Forms("FormName")
  2. is equivalent to
  3. Forms!FormName
So instead of passing a string reference to a container object to identify the element required the name is included in the code itself.
Dec 7 '06 #23
Can you post the code you have in the relevant Event procs.
I'm not sure what this is - it may be code related - but it's possible it's not Access related at all (maybe a glitch elsewhere). Try to explain clearly the circumstances under which the problem occurs too as this could also help.
when I exit out I get a box that says an error as occured and everything goes away and all I have is me desktop and icons. No home page or anything but this only happens when I x out
Jan 29 '07 #24
NeoPa
32,556 Expert Mod 16PB
I'm really not sure where you're coming from.
Is this related to the current thread?
You quote my post (#2) but you don't provide the information requested therein.
Have no idea what you're looking for here :(
Jan 29 '07 #25

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
14
by: kosuke | last post by:
I keep getting the following error/warning message when using the python based program getmail4: /usr/lib/python2.3/optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will return a...
0
by: JC | last post by:
I am using Mysql version: 4.0.18-max-log and trying to populate a database from a text file using source option from inside the mysql environment. The population run OK but when creating the...
2
by: JTrigger | last post by:
When I compile using the IDE, my web project works just fine. When I compile using csc.exe I get an error trying to brows the web project. It gives me an error about Glocal.asax not able to load...
2
by: knutivar | last post by:
I download and grab a .NET solution from Vault and open it on my local computer. It works fine - I can compile it - no problems. But when I check it out and do a small changes in any classes. I...
0
by: smkkaleem | last post by:
I am stuck with the error I have posted above in the question title I am developing ASP.NET 2.0 web site and I have added a new rdlc file to my project by using the following process: -Right...
8
by: Brian Tkatch | last post by:
Server: DB2/SUN 8.1.6 Client: DB2 Connect Personal Edition (No 11) <URL:ftp://ftp.software.ibm.com/ps/products/db2/fixes2/english-us/db2winIA32v8/fixpak/FP11_WR21365/FP11_WR21365_CONPE.exe> ...
4
by: keychain | last post by:
I'm experience the infamous "SSL: Fatal Protocol Error" bug with Apache 2.x According the fopen() documentation: "If you are using fsockopen() to create an ssl:// socket, you are responsible...
10
by: asit | last post by:
Are warnings equally dangerous like errors ???? What is the difference between errors and warnings ??
20
by: jacob navia | last post by:
Consider this code static typedef struct { int boo; } FOO; This provokes with MSVC: ------------------------------ Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.762 for x64...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.