I am trying to trigger a script when a user duplicate record in a layout in filemaker 13. But I can not capture this action. Anyone have any ideas about how to do this?
Thank you so much,
One answer to the question, as asked, is to use FileMaker Pro 13 Advanced. The custom menus feature will allow you to override the Duplicate Record menu function with your own script.
However, per your comments, it sounds like the true question you're trying to answer is: "How do I clear a field when a record is duplicated?"
You can do this in either FileMaker Pro or FileMaker Pro Advanced by setting the field's Auto-Enter Data value to blank. Then each new record will have the field cleared when the record is created.
You can do this in the following way (there may be some minor variations for Windows computers):
Go to: File Menu > Manage Submenu > Database...
Select: Your Table and then your Date Field from the Fields tab
Click: The options button (with your Date field selected)
Check: The Data checkbox within the Auto-Enter tab, leaving the data field blank
Related
I want to preface this by saying I don't have any real programming background, I'm just trying to update an existing database at work.
We have an access database and I want to add an additional Y/N checkbox to an existing form. The form updates a SQL table. Currently the record source is a SQL statement.
I can go to the SQL table, add a new field and make it Yes/No data type. There are other Yes/No fields in the table and the default settings for the new field are identical to the others. I next go and update the linked table through External Data in the ribbon. I can go into the table in Access and see the new field - so far, so good.
Next, go to the form design view and form properties, go to the record source, update the SQL statement to include the new field. (I've also tried this thru query builder, same result.) From here, I start to get the error.
If I go back to form view and change any data in the form and hit the next record button or save button, I get the Write Conflict error. "This record has been changed by another user since you started editing it..." The 'Save Record' button is greyed out. I am the only person accessing the database or SQL server.
I've tried to finish building the new button and linking it to the new field in control source (that went fine), but it didn't make any difference. If I go in to edit the record source and remove the new field, everything works again (but of course, the new field isn't in the control source list, so isn't linked to the check box).
Any ideas? Thanks.
A strong contender for the reason for your problem is the form itself.
Most likely the form is setup with a specific query as the Record Source. Its not to say that that is inherently incorrect, but it makes adding new columns to the source significantly more difficult.
The problem would likely be solved if you just changed the Record Source to reference the table itself, rather than a query, if that is in fact how it is referenced.
If Ms Access tries to pull data from a table using a query through a form it will inherently Pessimistically Lock the table in question, making it unable to be modified. However, you can usually still modify the table through the query itself, but you would need to add the column changes into that query first.
I'm not quite sure if I am making sense here, but something like this (for a table called "Table1"):
In theory, if the form is the problem... then if you closed it and tried to make modifications to the table, then the changes should work when the form is closed.
Someone else fixed it for me, but from what I understand, it was a communication issue between SQL and Access. Something with the setting of the null value in SQL not being set the way that Access could understand.
We had the issue narrowed down. When the new field was added to the table, you couldn't change any info directly in the table, but you could with the form.
If you added the new field to the form's record source, you couldn't edit any info at all.
Thanks for everyone's input.
I'm working an Access Database for my church's local cemetery. They wanted something free, and low-to-no-maintenance, and I didn't want to go with anything online.
So I've made a sample Access Database with the fields and a simple query, checking if the field is filled out, and searching for the field if it contains something. My only problem is that, since these people want something user-friendly and easy, I can't have them right-click, close, then double click on the query every time they update the search form and click the button. What's the best way to fix this?
Again, I want to not have to quit out of and re-open the query every time I update the search form
Example Search (using random names): Every first name contains "o": https://i.imgur.com/2t5B9lK.png
Example output: https://i.imgur.com/JqZ8f7v.png
Do the search in the form header and show the results in the form details.
Hello I have a pretty intricate Access database. I just jumped on this project and have never used Access. I have a form that is generating a value entry popup when I try to run it and it shouldn't be. The problem is the form is trying to access a column of a table which has been changed recently. I just have no idea where to find the query or what exactly is trying to access that column. Any help greatly appreciated. I am using Access 2016 also.
Sounds to me like the problem inst actually your form but the query your form is based upon.
This may be a separate query or a query built in your forms record source.
Go to your form in design view. Open up the property sheet. (Under design tab) make sure the dropdown box has Form Selected and look at the Record Source.
The record source may state a query name, In which case you should remove the field/replace the field with another in that query.
Or if it says something along the lines of "Select ......" then just alter that query to not have the field you have removed/renamed and the problem should go away.
However it is worth noting that if you have sub forms it could be the record source of one of those.
I have a data entry form that uses combo boxes with dropdown menus that was working as planned. I created a form to display the data using a QBE created query in datasheet view. When I come back to the data entry form, everything works except it doesn't write the data to the file.
I checked the record source for the form and the control source for the comboboxes and all is as it should be. I have a date in the file that is =Date() for today's date, and it appears in a new record but the fields are blank.
Any suggestion would be helpful.
Additional info, I did a compact and repair on the database but that didn't solve the problem. Sunday I copied everything to a new database and that didn't help. Copied to new database again, but only the data entry form, DE queries etc. Still no luck.#$#%$#.
New information added 6/13/16.
After further testing, the problem lies when I tab out of the last ComboBox. So the question is, what determines a write to the file: is it tabbing out of the last control? Or what?
Under Form Properties | Other
Set Cycle to "Current Record"
So I have two issues with my database, which I think are linked together.
Firstly if tblDeliveries is empty and frmMainView is opened it comes up with "You must enter a value in the 'tblDeliveries.deliverySlot' field" but the form shouldn't be trying to create a record and I can't see any reason why it would. Opening frmDailyView (which is a subform of frmMainView) doesn't show this behaviour but it is the one with the continuous form on...
Secondly if tblDeliveries has one (or more) rows the first row of the table will jump about... For example in frmMainView if the date of the first record is set to 23/01/2015 and you navigate to the 24/01/2015 and click anywhere on the subform and then press F5 to refresh the record will have jumped to that date, the date even changes in tblDeliveries.
I have no idea why it's doing it, I even removed all of the VBA code for the form to stop it, but it happens anyway.
If anyone has come across anything like this before, please let me know how you fixed it, or any suggestions would be very welcome. Thanks!
EDIT: If you download the database, add your computer login name to tblUsers. Also the date is UK formatted, so might need tweaking to work with US dates.
The offending database (1.5MB)
Taking a look at your database, several issues are occurring.
You first issue can be resolved by going into the Design View of the table tblDeliveries, select the deliverySlot field and change Required (in bottom panel) from Yes to No.
Your second issue is multi-faceted with many issues but a critical problem is that the parent-child link field, deliveryDate, between the main form and subform is missing in the recordsource of the sub form and the field's table origin is not in the query's join statements. For me, I can't even update anything in subform (all boxes are grayed out).
Essentially, you are trying to normalize Delivery Dates and Delivery Times (one-to-many) but the left join query (qryDeliveryIncBlanks) setup is not aligned to this effect. You user login also does not integrate smoothly into frmMainView. My ultimate advice is revamp your database design relational model then use forms as the visual representation of those related tables.
I am not re-iterating the points of #Parfait.
Access Forms have a property DataEntry. If it is set to Yes (or True in VBA), then the form will open itself pointing to a new empty data record. Set this property to No (False in VBA).
If you want to give the user the possibility to manually enter a new record, set the property AllowAdditions to Yes and to No otherwise. Yes displays an empty record marked with a star * and the end of the data sheet or continuous form.
I've resolved the issue, thanks to some of the comments I realised I could just give the deliverySlot field a default value with a number outside of the range it would look for, I set it to 99, but it only looks for 1-20. The date still jumps around but since it's not in the range of the query it's hidden. It's resolved both issues.