ContentDocument is not workin in vba - html

object.document.getElementsByTagName("frame")(0).contentDocument.getElementById("ID").Value ="abc"
object.document.getElementsByTagName("frame")(0).document.getElementById("ID").Value ="abc"
When I use two codes mentioned above, it shows the error message "NULL REFERENCE"
But when I use 3rd code which is mentioned below, it is running fine.
object.document.getElementsByTagName("frame")(0).Document.getElementById("ID").Value ="abc"
But in this case when I write it in macro, then "Document" becomes "document" and shows the null reference error.
object.document.getElementsByTagName("frame")(0).Document.getElementById("ID").Value ="abc"
becomes to
object.document.getElementsByTagName("frame")(0).document.getElementById("ID").Value ="abc"
Please help. Thanks in advance.

Related

There was an error compiling this function. Access 2013 Calculated field issue

I have a table with a field which is of a calculated type and contains the following expression:
IIf(IsNull([OrderValue]),[TotalPhaseLabourCost]-[DefaultOrderValue],[TotalPhaseLabourCost]-[OrderValue])
For some reason when I go to open the table in any view it throws the error:
"There was an error compiling this function.
The Visual Basic module contains a syntax error.
Check the code, and then recompile it."
However, I have this database currently open on two laptops, one works fine and the other has this issue. I have checked both db's refs and they also match up.
That's a bit vague, so I can only make guesses.
Try to compile the code as the error message says.
check if you have any function with the same name as your field
Try replacing IIf(IsNull([OrderValue]), by IIf([OrderValue] is Null,
You probably miss the leading equal sign:
=IIf(IsNull([OrderValue]),[TotalPhaseLabourCost]-[DefaultOrderValue],[TotalPhaseLabourCost]-[OrderValue])
Or you could use:
=[TotalPhaseLabourCost]-Nz([OrderValue],[DefaultOrderValue])
For me there was some problem with some fields (it showed an error message #NAME? in some of the fields (date, number) in the 'new' record).
For me it worked to close the table, right-click it and open in design view.
For each of the fields with problems, I choose the data type (that was already shown) again from the drop down menu (so, same data type!).
Save.
Then it didn't give the error messages anymore.

Complie Error: Method or Data Member not found, but it does exist

Having a strange problem in vba access. I have a text control control called txtUserName on a form and am trying to get the contents which is all but child's play. When I try to run or complie, I get the Method or Data Member not found error. However, when I type me. Intellisense shows txtUserName. I have gone as far as copying and pasting the name from the control's properties and still get the error. What am I missing? I am completely perplexed.
Thanks in advance
Don
In this case, I was just building a SQL string. I did find the problem, there was a bad control reference, however, it was not the one that was highlighted (highlighted was the first value in an insert into string and it was actually the 3rd value)

'and' keyword help in google drive api's "try it yourself"

Is your sandbox (https://developers.google.com/drive/v2/reference/files/list) not working properly or am I doing this wrong?
Here's the parameters I'm putting in for q--
'[folderid]' in parents and name contains '[document name]'
^^ folderId and document name are of course replaced with actual things (no brackets) in my search.
Any idea what's going wrong?
Help is greatly appreciated. Thank you!
The problem with your query is the "name" keyword, not "and".
For some reason, in v2, the query textfield for Try It Yourself does not accept "name" keyword. It always returns error "The value of the parameter 'q' is invalid."
But, I noticed that if you changed 'name' with 'fullText', like:
'folderid' in parents and fullText contains 'Android'
then it works. The query is accepted.
However, this seems to have been fixed in Drive v3. In v3,"name" is accepted query keyword. Thus,
'folderid' in parents and name contains 'Android'
works like a charm.

MS Access VBA Compile Error on "x="

Everytime I try to compile my VBA code, I'm getting an error that says "Can't find project or library".
I have no idea which library I'm missing because all that the debugger highlights is a portion of one of my VBA lines:
x=
the full line looks like this:
x = MsgBox("You must select a manufacturer")
Any clues what library I need to include?
Thanks Hans,
I didn't notice that one of my references was labeled as "MISSING".
...
First thing to check: from VB Editor main menu, choose Tools->References. If any of the selected (checked) references are "Missing", all sorts of weird crap can happen with your code. Fix any that are missing

NotInList script

I am trying to use Access and VBA to create a DB to store my library. I already posted a question and got a useful answer but I am still failing with the basics, so, after having checked this tutorial link I am starting from scratch and doing it in smaller steps (i.e. asking more basic questions...).
I have the following DB structure and relationship details:
DB structure and relationship details http://img195.imageshack.us/img195/8184/relationshipdetails.png
Using the Access AutoForm:Columnar wizard I created a Form based on the Table Libri, then I changed the field "Stanza" into a ComboBox, I entered the RowSource as follows:
ComboBox http://img560.imageshack.us/img560/160/comboboxdata.png
Then in the Event tab I selected the ... controls in the NotInList and in the VBA I entered the following code:
VBA code http://img689.imageshack.us/img689/1416/notinlistcode.png
Saved everithing, but when I open the Form Libri and try to enter a value in the ComboBox I get the following error message:
Error message http://img41.imageshack.us/img41/8937/errormsgt.png
All my tables are empty (no records).
So the VBA code seems not to be considered/executed at all, what am I doing wrong or missing?
Ok, I was completely blind.
The error is the option: "Limit to list" that I set to "NO" and instead, the NotInList event is only filred if such option is set to "yes".
I find this conter-intuitive, but at least now I know.
Sorry for bothering other. hope this is helpful some other newbe like me.