|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
inserting form information into a table in access
I have built a query that gets out Incentives that a Volunteer has earned. However, once in the access form, the volunteer has earned the incentive a user must approve this by entering the date the volunteer receives the incentive and then the values:
IncentiveTypeID, VolunteerID, and Date are inserted into the IncentivesReceived table of the database. Here is my code and it works, sort of... it pops up parameter boxes for me to enter in the ID's and date and appends a row to the IncentiveReceived table. Code:
Private Sub Text8_LostFocus()
Dim strSQL
strSQL = "INSERT into IncentiveReceived "
strSQL = strSQL + "(`IncentiveTypeID`,`VolunteerID`,`Date`) "
strSQL = strSQL + "VALUES ([IncentiveTypes]![IncentivesTypeID],[IncentiveTypes]![VolunteerID],[IncentiveTypes]![Date])"
DoCmd.RunSQL (strSQL)
End Sub
Can anyone help? Thanks in advanced. Last edited by ironchef : December 16th, 2003 at 11:02 AM. |
|
#2
|
||||
|
||||
|
you do say -- twice, in fact -- that the values are inserted into the table
(actually, the second time, you just say that a row is appended, and it might be appended with nulls, who knows) so your problem is...? by the way, i would not use the mysql-specific backticks around access table names rudy http://r937.com/ |
|
#3
|
|||
|
|||
|
I have a subform that displays IncentiveTypeID, IncentiveAward and Date that depend on the VolunteerID of the main form. What I would like to be able to do is:
[::] When a Volunteer earns an incentive that not only does it display the incentive but the IncentiveTypeID, VolunteerID and Date needs to be sent to the table (IncentivesReceived) when a user enters the date the incentive is received. Also, it has to be able to be updated, in case a user enters in a wrong date and changes it later. [::] I don't want the parameters to pop-up I want it to be a automatic "grab the values and shoot them into the IncentivesReceived Table. Thanks. Last edited by ironchef : December 16th, 2003 at 12:35 PM. |
|
#4
|
||||
|
||||
|
can't help you, pal, that's access programming, all i can help you with is the queries
good luck and i hope you find your access programmer |
|
#5
|
|||
|
|||
|
Access has some funky rules. To be able to update from a query you need to do two things:
1) Join the query and table on the fields you want to update 2) In properties for the field to be updated find the Update To cell and list the field from which data is to be extracted |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > inserting form information into a table in access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|