ms access - Inserting new argument to table through search form of another table -


In my database I have a form for search products (fields: ID, name, manufacturer_id [to display the manufacturer's name Set], category_id, price). I would like to get the ability to add manufacturers through this form, so I have created a VBA script but it does not work. However when I enter a new name it will give me the "Select element from the list" signal. What I'm doing wrong

  private sub-manufacturer_id_NotInTheList (NewData string, as the response integer) as strings strSQL string, as strInfo string strInfo = "creator" Amp; NewDATA & amp; "Not in the list." & Amp; VbCrLf & amp; "Add?" MsgBox (strInfo, vbYesNo + vbQuestion, "Element not on list") vbYes then strSQL == "Producer (name, country, id_distributor) values ​​(included in" & "NewData & amp;" ',' undefined ' '0'); "DoCmd.SetWarnings (false) DoCmd.RunSQL strSQL Response = acDataErrAdded or Response = acDataErrContinue NewData =" "Me.manufacturer_id.Text =" "End End  

If the property in the list of your drop down box is set to true, then blocking the entry and making a complaint first (Because your user has added to the manufacturer who does not have it).

If the boundary is wrong, then you should run your process and set it to the list.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -