psychology of dating down - Updating a table in access

Open _ "Driver=;" & _ "Dbq=C:\__tmp\publicdatabase.accdb;" & _ "Exclusive=1;" & _ "Uid=admin;" & _ "Pwd=;" On Error Go To 0 con. Execute "INSERT INTO Table1 SELECT * FROM [MS Access; DATABASE=" & Application. If so, you can open it and make sure there are no entries (the same process you use to import that PICK file), and if it's clear then you can run your import/export process. Count & ")" sql = "INSERT INTO $ SELECT * FROM [MS Access; DATABASE=C:\data\SOURCEDB.accdb;].[$]" sql = Replace(sql, "$", s Table, 1, -1, vb Text Compare) con.

Connection") On Error Go To Update Public Database_Open Error con. We're still in the dark ages at work (A2003) so I'm not sure about this; is there no locking file in A2007?

Works correctly in the the form, but does not update the fields in the table. Works correctly in the the form, but does not update the fields in the table. Mac, Tried entering the string into the default value box -- still no change/update to the table fields. To calculate a future date by using the Date Serial function In the Database window, click Forms under Objects, and then click New.

Now i want to pass this earned salary value to the table field.

Can you please help me Firstly some house-keeping; With your field names it is best not to have any spaces in them, makes it much easier to code (from your SQL string it looks like you may have done this but just checking).

Also, avoid using reserved words as field names eg don't use Name as a field name, there is a list of Visual Basic reserved words here which will cover everything VBA and a little bit more.

Secondly, it seems you are storing a calculated field - Earned Salary is a calculation of Basic Pay, Total Working Days In Month and Actual Worked Days.

I am very new to the Acces and i am trying to calculate the Earned salary of the employee based on the no of Worked days.

For this i have created a Form to input the no of days present and calculate the earned salary based on the input.I've tried all three of these to no avail: UPDATE webpages SET webpages.topic_id = ( SELECT topics.topic_id FROM topics WHERE topics.topic_name = webpages.page_topic ) WHERE EXISTS ( SELECT topics.topic_id FROM topics WHERE topics.topic_name = webpages.page_topic ) Thanks rudy.That gives me the all too familiar "[Macromedia][Seque Link JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. I might just have to query the topics, and stick an update query in the Do they ever? The code needs to be in the After Update of Actual Worked Days. Execute "INSERT INTO [tbl Your Table] (Employee ID, Earned Salary) VALUES (" _ & Me!Further, it looks like you are using a bound form which would mean you don't need to use the SQL update, a solution akin to Allen's example would suffice: On the form if you have a control for each of the fields involved in the calculation: Quite generic as you haven't given much detail but something like this in the After Update should work: Assume controls on the form are: txt Emp ID for employee ID, txt Hourly Rate for what to multiply the number or hours by, txt Hours Worked as what you input as hours worked Dim dbl Earnings as Double dbl Earnings = me! txt Emp ID & "," & dbl Earnings & ")",db Fail On Error I would probably look to record the hours worked and the hourly rate and calculate the salary on the fly rather than storing a calculated number.I think that article is how to do it in the Access desktop app, which I have no clue whatsoever how to use.

Tags: , ,