Solved Update field in table (1 Viewer)

IvaanGarciia

Member
Local time
Today, 06:36
Joined
Mar 5, 2020
Messages
37
Hello AWF!!

I got an form for returning asset in this form it should be saved the actual date (It has an textboxt hidden with =now())

1583864836459.png


When I hit go to i can select an asset associated to an user, as the regirst of that line in table has the fecha_rec (Return date) in black return that black value, I'd like to update that value with the current date before I hit save and new.

Regards,
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:36
Joined
Oct 29, 2018
Messages
21,357
Hi. Not sure I understand your question. Are you saying you want to put Today's Date every time the user hits the Save and New button on your form?
 

IvaanGarciia

Member
Local time
Today, 06:36
Joined
Mar 5, 2020
Messages
37
Hi. Not sure I understand your question. Are you saying you want to put Today's Date every time the user hits the Save and New button on your form?
Yes actually that fiel has blank value
When I hit the save I would like to send the =Now() date

Save and new Macros
1583866643496.png


1583866732429.png

This is my query related with asset, empleado and prestamo tables.

1583866869312.png


Yes, I like to update (blank value) with the current date.

Thanks,
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:36
Joined
Oct 29, 2018
Messages
21,357
Try the SetValue macro action.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:36
Joined
Oct 29, 2018
Messages
21,357
I just tried it, and it worked for me.

SetValue.png
 

IvaanGarciia

Member
Local time
Today, 06:36
Joined
Mar 5, 2020
Messages
37
Not for me, Is there another way to send a value from that textbox with current date via button? maybe an update sql query?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:36
Joined
Oct 29, 2018
Messages
21,357
Not for me, Is there another way to send a value from that textbox with current date via button? maybe an update sql query?
Sure, you can use an UPDATE query. However, wouldn't you want to fix the real problem instead? Go ahead and create an UPDATE query and try running it using a macro. You may have to save the record first though before running the query to avoid write conflict.
 

IvaanGarciia

Member
Local time
Today, 06:36
Joined
Mar 5, 2020
Messages
37
Sure, you can use an UPDATE query. However, wouldn't you want to fix the real problem instead? Go ahead and create an UPDATE query and try running it using a macro. You may have to save the record first though before running the query to avoid write conflict.
I'm trying of simplify the process of return a device.. In my head xD I'd like that when I hit the return form only search an asset ID and see the employee that has assigned that asset and with just click save... update the record in the table, the values of current date and the field with active changed to Inactive.

https://mega.nz/#!9F1SiKBA!NTWSLwa564exeHgQyWk7dkbK55XLRfAsHEKzsvtgnKg
I've attached the link maybe you can take a look
I'm getting crazy with this
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:36
Joined
Oct 29, 2018
Messages
21,357
I'm trying of simplify the process of return a device.. In my head xD I'd like that when I hit the return form only search an asset ID and see the employee that has assigned that asset and with just click save... update the record in the table, the values of current date and the field with active changed to Inactive.

https://mega.nz/#!9F1SiKBA!NTWSLwa564exeHgQyWk7dkbK55XLRfAsHEKzsvtgnKg
I've attached the link maybe you can take a look
I'm getting crazy with this
Hi. I tried downloading your file, but it got stuck at "Initializing..." and never downloaded at all. Also, do we really need to see a 16MB file? Can't you create a smaller version including only what you need us to look into?
 

IvaanGarciia

Member
Local time
Today, 06:36
Joined
Mar 5, 2020
Messages
37
Hi. I tried downloading your file, but it got stuck at "Initializing..." and never downloaded at all. Also, do we really need to see a 16MB file? Can't you create a smaller version including only what you need us to look into?
Here you go
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:36
Joined
Oct 29, 2018
Messages
21,357
Hi. Got it. However, I looked at the embedded macro for you Save button, but I don't see a SetValue action. How did you try to use it? Make sure you use it before the SaveRecord and the GoToRecord actions.
 

IvaanGarciia

Member
Local time
Today, 06:36
Joined
Mar 5, 2020
Messages
37
Hi. Got it. However, I looked at the embedded macro for you Save button, but I don't see a SetValue action. How did you try to use it? Make sure you use it before the SaveRecord and the GoToRecord actions.
yes, some many times attempted that, but not works
 

IvaanGarciia

Member
Local time
Today, 06:36
Joined
Mar 5, 2020
Messages
37
1583950967551.png


I had to erase the value of fecha_ rec in the table, but when I attend to save show property not found. It has the same issue I'm not able to save that value.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:36
Joined
Oct 29, 2018
Messages
21,357
View attachment 79737

I had to erase the value of fecha_ rec in the table, but when I attend to save show property not found. It has the same issue I'm not able to save that value.
Hi. I can't see from your screenshot, but did you enable the content of the db or put it in a Trusted Location? I don't get that error right now.

before.png
save.png
after.png
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:36
Joined
Oct 29, 2018
Messages
21,357
Awesome!! it was the trusted location lol that solve many things that I had been stucked these days, thanks a lot.
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom