Run update query from a form

patheo

Registered User.
Local time
Today, 11:29
Joined
Dec 12, 2011
Messages
15
Hello,

I have attached a database containing a table and an update query that I want to execute from an update button located on a form.

On the form, I will just fill the controls "new purchase price" and "new sale price" and select a product. By pressing on the "update" button, I will set the new prices for the product selected.

Please, help me finalize this application.

Thanks in advance,

Patheo
 

Attachments

I've amended your query so it now works. Open it in Design view and compare my version with your original. Also examine the code behind the On Click event of your Update button.
 

Attachments

Hello John! Thanks so much!!!
It works fine!
 
hi John,
I have a problem, in case I have 2 lines for the same item in the table, I cannot update them all at the same time.
Could you set up that function for me?

thank you
 
Before you go to much further with this project you might want to read up on Data Normalisation, and perhaps refine your table structure.

You might get some inspiration from the free data models available here.
 
was looking for this.
Thanks. John Big Booty.

in a query, i have a field "Grade:"
it grades according to the below criteria. i want user to edit the constant marks in a form i.e 80,70,65,60,55,.... can this be possible?

Code:
Grade: IIf([Marks]>=80,"A",IIf([Marks]>=75,"A-",IIf([Marks]>=70,"B+",IIf([Marks]>=65,"B",IIf([Marks]>=60,"B-",IIf([Marks]>=55,"C+",IIf([Marks]>=50,"C",IIf([Marks]>=45,"C-",IIf([Marks]>=40,"D+",IIf([Marks]>=35,"D",IIf([Marks]>=30,"D-",IIf([Marks]<30,"E"))))))))))))
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom