Compile error: method or data member not found - ms-access

When I try to compile, I have been getting this error saying "Method or data member not found".
This is the code:
Set db = CurrentDb
Set rec = db.OpenRecordset("Select * from SuppliersT")
rec.AddNew
rec("SupplierName") = Me.SupplierAddNameTxt
rec("Address") = Me.SupplierAddAddressTxt
rec("City") = Me.SupplierAddCityTxt
rec("ProvinceState") = Me.SupplierAddProvinceStateTxt
rec("PostalZip") = Me.SupplierAddPostalZipTxt
rec("Phone") = Me.SupplierAddPhoneTxt
rec("Fax") = Me.SupplierAddFaxTxt
rec("Email") = Me.SupplierAddEmailTxt
rec("Notes") = Me.SupplierAddNotesTxT
rec.Update
It highlights the Me.SupplierAddNameTxt in
rec("SupplierName") = Me.SupplierAddNameTxt
I have a textbox named SupplierAddNameTxt on the form the button is located on, and that's why I am trying to set that up to. Not sure why it's doing this. Help would be much appreciated!

I created a form frmTest, added the control SupplierAddNameTxt, with your code, there is no compiling error.
So please check orthograph of the word SupplierAddNameTxt of the control name on the form.
You might type SupplierAddNameTxt in caption instead of the property name.

Related

I'm having trouble with sending a form using POST to retrieve data in R

I'm having trouble collecting doctors from https://www.uchealth.org/providers/. I've found out it's a POST method but with httr I can't seem to create the form. Here's what I have
url = url = 'https://www.uchealth.org/providers/'
formA = list(title = 'Search', onClick = 'swapForms();', doctor-area-of-care-top = 'Cancer Care')
formB = list(Search = 'swapForms();', doctor-area-of-care = 'Cancer Care')
get = POST(url, body = formB, encode = 'form')
I'm fairly certain formB is the correct one. However, I can't test it since I yield an error when trying to make the list. I believe it is because you can't use "-" characters when naming although I could be wrong on that. Could somebody help please?
I am unable to comment properly but try this to create an list. Code below worked for me.
library(httr)
url = 'https://www.uchealth.org/providers/'
formB = list(Search = 'swapForms();', `doctor-area-of-care` = 'Cancer Care')
get = POST(url, body = formB, encode = 'form')
When you are creating names with spaces or some other special character you have to put it into the operator above.

TypeError: 'cv2.face_EigenFaceRecognizer' object is not callable

I ran into an error which i do not know where and what is causing it.
Please i need help.
def train(self,images,lables, recogType=0):
self.images = images
self.lables = np.array(lables)
'arg = recogType:[cv2.face.LBPHFaceRecognizer_create(),cv2.face.FisherFaceRecognizer_create(),cv2.face.EigenFaceRecognizer_create()'
recogs = cv2.face.LBPHFaceRecognizer_create(),cv2.face.FisherFaceRecognizer_create(),cv2.face.EigenFaceRecognizer_create()
self.recognizer = recogs[recogType]()
self.recognizer.train(self.images,self.lables)
The specific problem is with this line:
self.recognizer = recogs[recogType]()
By placing braces () on the end, you are trying to call the recognizer, as the error says. Change this to
self.recognizer = recogs[recogType]
//Disclaimer - there may be other problems.

VBA - Filling input boxes in Internet Explorer not working

I'm having the following problem which is once I populate some inputbox on IE with information from Excel using VBA, these are populated correctly but when i change onto the second line with input boxes (they all are the same in format) the one I filled before does not get saved (even if I press save).. the only way I found for the information to remain is if I get into any of these boxes I'm filling and type something manually.
Anyone has an idea of why this might be?
Thanks!
For Each cell In wsbd.range(range("A6"), range("A6").End(xlDown))
additemsbtn.Click
Set aNodeList = ieDoc.querySelectorAll("[dojoinsertionindex]")
aNodeList.Item(0).Click
For i = 0 To 15
If ieDoc.getElementById("meetingResultsPlanningTable").getElementsByTagName("select")(0).Item(i).innerText = wsbd.range("A6").Value Then
ieDoc.getElementById("meetingResultsPlanningTable").getElementsByTagName("select")(0).Item(i).Selected = True
Exit For
End If
Next i
Set dropOptions = ieDoc.getElementById("meetingResultsPlanningTable").getElementsByTagName("select")(5)
dropOptions.Value = "Value"
Set itemName = ieDoc.getElementById("dynamicLineItems").getElementsByClassName("InputBox")(0)
itemName.Value = wsbd.range("F6").Value
Set itemName = ieDoc.getElementById("dynamicLineItems").getElementsByClassName("NumInputBox2")(0)
itemName.Value = wsbd.range("J6").Value
Set itemName = ieDoc.getElementById("dynamicLineItems").getElementsByClassName("NumInputBox")(0)
itemName.Value = wsbd.range("Q6").Value
Set itemName = ieDoc.getElementById("dynamicLineItems").getElementsByClassName("NumInputBox")(1)
itemName.Value = wsbd.range("T6").Value * 100
Set itemName = ieDoc.getElementById("dynamicLineItems").getElementsByClassName("NumInputBox")(1)
itemName.Value = itemName.Value + 0
'Set savebtn = ieDoc.getElementById("/images/buttons/save.gif")
' savebtn.Click
Next cell
The code is working and is reading properly all the inofrmation in Excel, finding the corresponding Input boxes and populating them but then nothing gets saved or recorded.. as you can see I tried saving after completing the boxes but it still doesn't work...
I came up with a solution! And pretty simple by the way.. I just added a fireevent ("onchange") for each input box and that records all changes!
Set itemName = ieDoc.getElementById("dynamicLineItems").getElementsByClassName("InputBox")(0)
itemName.Focus
itemName.FireEvent ("onchange")
itemName.Value = somevalue.Value

Update is not working in Access VBA - ADODB.Recordset

I try update recordset by update argument and code run good but a updating record is still same.
Code:
With mMails
.LEVEL1 = cTagLevel1
.MAIN_TAG = cTagLevel2
.DETAILED_TAG = cTagLevel3
.FIELD_TAG = cTagField
.INSIGHT = cTagInsight
.BRANCH = cTagBranch
.DataSource.Commit
End With
And Commit Sub:
Public Sub Commit()
mRst.Update
End Sub
And Connection:
Set mRst = New ADODB.Recordset
Set mRst.SOURCE = pCmd
mRst.CursorLocation = adUseClient
mRst.CursorType = adOpenStatic
mRst.LockType = adLockBatchOptimistic
mRst.Open
If Not (pAccessMode = AccessMode_ReadOnly) Then
Set mCn = pCmd.ActiveConnection
End If
Set mRst.ActiveConnection = Nothing
All values with mMails are correct but update doesn't work. What I doing wrong? When I tried use UpdateBatch the update want change whole row and not only selected...
Sry for my English :) and thanks a lot for any help!
I see you use a static cursor: "A static copy of a set of records that you can use to find data or generate reports. Additions, changes, or deletions by other users are not visible."
I think you should use a dynamic cursor: "Additions, changes, and deletions by other users are visible, and all types of movement through the Recordset are allowed."
Note the word "copy" in the description of the static cursor: you are making changes to a copy, but the copy is not saved in the database.
You also may need to change the CursorLocation property to adUseServer: "If the CursorLocation property is set to adUseClient, the only valid setting for the CursorType property is adOpenStatic".
See also: http://www.w3schools.com/asp/ado_ref_recordset.asp

Problem updating values in combobox in vb.net

I have this code, but I have a problem.
When I update but do not really made any changes to the value and press the update button, the data becomes null. And it will seem that I deleted the value.
I've taught of a solution, that is to add both combobox1.selectedtext and combobox1.selecteditem to the function. But it doesn't work.
combobox1.selecteditem is working when you try to alter the values when you update. But will save a null value when you don't alter the values using the combobox
combobox1.selectedtext will save the data into the database even without altering.
But will not save the data if you try to alter it.
-And I incorporated both of them, but still only one is performing, and I think it is the one that I added first:
Dim shikai As New Updater
Try
shikai.id = TextBox1.Text
shikai.fname = TextBox2.Text
shikai.mi = TextBox3.Text
shikai.lname = TextBox4.Text
shikai.ad = TextBox5.Text
shikai.contact = TextBox9.Text
shikai.year = ComboBox1.SelectedText
shikai.section = ComboBox2.SelectedText
shikai.gender = ComboBox3.SelectedText
shikai.religion = ComboBox4.SelectedText
shikai.year = ComboBox1.SelectedItem
shikai.section = ComboBox2.SelectedItem
shikai.gender = ComboBox3.SelectedItem
shikai.religion = ComboBox4.SelectedItem
shikai.bday = TextBox6.Text
shikai.updates()
MsgBox("Successfully updated!")
Please help, what would be a simple workaround to solve this problem?
a few things to remember ---
a 'selected____' anything is only non-null when something is, uhm, SELECTED. To ensure that SOMETHING is selected even at start add a line like: ComboBox1.SelectedIndex = 0.
If your recordset has non-string types (like a DATE field might be) then be sure to first check then coerce the string coming back as TEXT to the correct type. I.e....
if isDate(ComboBox1.SelectedText) then ... 'its ok to use this coerced text.
Since a combobox (as well as a listbox) can hold an entire CLASS (i.e. any kind of OBJECT) ... any SelectedItem assignment had better match EXACTLY to the type that was .Items.Add 'ed originally to the control.