I have a main order form with a subform for order datails (products, quantity, extended price, etc..). The default way of calculating a selling price is by using the cost plus a profit margin (the margin is a percentage defined on the main form)
But sometimes we want to define the selling price differently, bu using the List price instead, on which I can apply a discount. So what I did is put a checkbox field on my subform, and when the checkbox is "true" the selling price is now the list price field from the products table instead of the "cost plus" calculated field.
So far everything works perfectly as described. The only that I am now left to do is to be able to "ask" for the desired discount when the checkbox is selected. What I mean is that when the checkbox is clicked (true), I would like for a dialog box to pop-up and ask for the discount that should be applied to that record in the subform...Is there a way to do that with a "msgbox" or should I make a small form with only one field on it?...
The main reason why I want to do it this way is that I dont want to put the "discount" field on my subform as it would be on every item line and it is used only rarely because 90% of the pricing are bases on "cost plus".
Does anyone know how to automatically enter the current date into a specified field by simply clicking on a check box. I imagine the IIf function would work when entered into 'Control Source' but I also need the check box to be linked to the underlying table. i.e. I tick the 'Paid' checkbox and the current date is automatically entered into the 'Date Sold' field. I also need the -1 generated by clicking on the checkbox to be stored in the table.
Any suggestions would be appreciated, although I am no good with code, so if you could post an example or an easier way to do it I would be most grateful
In trying to respond to another thread, I have run into something that is confounding me (or maybe I'm just getting dense).
We have a subform. One field has an event on DblClick to launch a search form. When the user identifies the target, he/she clicks a button on the subform. This pushes the appropriate value into a field on the original subform using VBA code and closes the search form. This all works fine.
The behaviour that is driving me bugging is when the user clicks on a new record (i.e. new line) on the subform, we would like to automatically generate the next record (E.g. when you type in a field of a record with autonumber in datasheet mode, Access automatically generates the next record). Currently this doesn't happen - Access generates the PK for the record being modified, but doesn't generate the view of the next record.
What really confuses me is that I have created similar looking example in which this works just fine. I can't figure out which of the differences between the two samples is causing this behaving.
Also, typing information into the field on the subform does cause the next record to be generated. It is just doing this via code that works in one case but not another.
I have narrowed it down to the actual subform. Even as a standalone form the form exhibits the same behaviour.
For reference, the original thread is http://www.access-programmers.co.uk/forums/showthread.php?t=99457
I have a table to store "issues" with fields Issue name(text), target date(date) and status (combo box-active & pending statuses). default status for new issue is active. when clicking a button i want to change the status of every record to "pending" status (combo box value should be pending) if the target date<current date.
I need to create a field in an input form that is simply the concatenation of two other text fields. I have tried all sorts of things, but when I look at the data in the table that field.
I have a field called ID that I want to be created like this:
=Format([UniqueID],"00000") & "-" & [Mosque]
This works well in my output fields, but does not work the same way on the input form. It needs to be based on the currently input values from the current record. Anyone have any ideas?
Working in MS Access 2010. Data must be entered and updated in Access only. Trying to figure out if it's even possible to auto populate dates in multiple fields in a form that are triggered when I enter ANY date in a primary date field on the form. I have close to half a dozen fields I'd like to do this for but here are a couple of the fields I'm working with:
Re Insp Date 90 Day Notice(Form field to be triggered and show a date 90 days prior to the trigger date) Re Insp Date 60 Day Notice (Form field to be triggered and show a date 60 days prior to the trigger date) Re Insp Date (Trigger date)
What I'd like to do is enter values in the "Re Insp Date" field (in the form) and have it trigger/auto-fill/auto-populate the "Re Insp Date 90 Day Notice" so that it shows the date 90 days prior to the "Re Insp Date" and the "Re Insp Date 60 Day Notice" so that it shows the date 60 days prior to the "Re Insp Date"........all this, and have it auto-update the queries and tables its linked to.
I've tried looking online and in instructional material to see if there is a formula, equation, macro, an expression or VBA coding that I can use to execute this but am having no luck.
The MAIN OBJECTIVE is to have the the linked query and table update automatically. Possible??
I have tried doing =([Re Insp Date])-90 but no dice...
i have a database am working on in access 2010. I want a field to take its value based on another field's combo.Example;i have a checkbox field called "Loan" "Yes/No" and i have another textbox filed "Status" (which will hold eligibility). I want the Status to read Eligible when the checkbox is No and Non-eligible when its Yes
Hello everyone, I have some experience with access but am having difficulty at the moment with a command. This is what I am wanting to do;
I have some checkboxes which when checked I want a separate field to display a number. i.e. When 'Taster' is checked 'Overall Price' will show '£225' but also when 'Meal' is checked 'Overall Price' shows '£500'.
i have created a form to enter details into a 'job' table.
here is the part of the form my question deals with.
FIELD- Airport DATATYPE- Yes/No FIELD- Terminal DATATYPE - Lookup wizard (the values 1-5 stored in a separate terminal table)
basically the system involves entering minicab jobs into the database. the job may or may not be at the airport.
THE RESTRICTION I WANT TO PLACE ON THE JOB FORM/TABLE
if the airport checkbox is ticked (Yes), then the terminal value can be set (1-5) from the form. if the airport checkbox is unticked (No), then the terminal value cannot be changed from the form.
if this can be done, how can it be done? anyone..??
Hello, I want to add a checkbox in my form which will update or enter a value to a field. To explain more better the form is access of application so the question will be does the user have Network Account. if the check box is checked then it should add a value to its own field or another field in the same table Network Account. If its not checked then the field should be blank. The way i am doing is i created a check box field and then there is seperate field hiden or in front of checkbox. The control source i put is iif([checkbox1]=-1,"Network",ISnull) this way i get the value in form field but its not linked anyway to table field.
Is there any easy way to populate a field i will be having couple of checkbox like this.
I'm fairly new to Access and have a question. I've been able to set up a decent database (my first) but am looking if certain Form functionality is available. I have a checkbox that is checked when a certain criteria is met. When that's checked, there's additional data that I need to enter. Is there a way to make those additional data fields either disabled or not visible at all until the checkbox is a yes? I appreciate your help!!!
From a table I want a text field which has a path to a file to be copied automatically into a another field of the same table with a hyperlink text type...
I have a query which is run from a form via a command button. On this form i have a couple control sources (not sure if this is the correct term, but i have text boxes and drop down lists which the query uses in its criteria).
Everything works fine except i can't figure out how to filter my checkbox field (aka MyDeliv). I'd like to have a drop down box with 3 options: "yes", "no", and "ignore". i would like "yes" to return only records with the MyDeliv box checked, "no" to return only records with the MyDeliv box unchecked, and "ignore" to return records regardless of the MyDeliv checkbox.
I have a sub form with checkboxes. Each check box represents one of the columns/fields in my query. If one of the boxes is checked, I only want the column that matches with the check box to appear. I have done some research and have came upon the ColumnHidden property.How would one do this in a macro or VBA format.
I have a colleague who executes a make-table query that reads a txt file. While doind this, he wants to convert two columns (binary format) to checkboxes (Yes/No format). Is there a way to do that?
I'm looking to create a "Same As Billing Address" check box that would automatically udpate the address in an order to reflect the customer's billing address.
I understand how to sync a combo box to an option group ( -- great article by the way)
I Guess what I'm looking to do is:
1. Sync a "Same As" Checkbox to multiple text boxes in the form (Unit, StreetAddress, City, Province, Postal) such that these fields are UPDATED (writen to) with the same information as the billing address
2. [U]IF the "Same As" Option is selected, I need the updated fields to lock, allowing no further update... but must by unlocked if the "Same As" option is NOT selected.
Please help me out with this one guys.. I really need it.
I have 2 tables both linked to SQL Server 1 has policy information and the other has error information both tables are linked with the relationship policy Ref. The error table(table2) has fields Pol ref, Error_Type,error, Comments, response_comments and response_Date.
There are 25 types of error so what I have done is copy all fields from table 2 25 times exlcuding the policy ref and Error_Type but to make them relate to the relevent error I need to setup some VBA code that does an if Error1_checkbox is ticked then make Error_Type ="error1" and Error=1 else if error1_checkbox is unticked then make error_type null(blank).
I have a field 'Payment Types' with values (Cash, Cheque, Debit/Credit Card) and a field 'Payment Received' which is Yes/No.
When putting the order through the user selects the payment type and ticks a box if payment has been received.
On a report for delivery drivers, the owner wants it simple for the driver... he wants all the payment types listed with a checkbox next to each one, then wants the appropriate box ticked if payment has been received.
So I need something on the report (or underlying query) which ticks the appropriate box, i.e.
If payment received = true then payment type checkbox = true.
Or should I put the payments into a separate table with both fields so multiple payment types can be marked as paid?
I have code which is attached to onclick of a checkbox,
What I want it to do is if the user clicks it and checks it then to add some note to a memo field, if the user clicks it and its already checked then it doesn't add a note to a memo field.
Code: Private Sub Check45_Click() If Check45 = 0 Then Check45 = 1 If Len([Forms]![Customer]!Notes.Value & "") = 0 Then
[Code] ....
But I can't seem to add any other lines which make sense to me that it doesnt add "letter sent" to a memo field if its already checked?
My database has a text field "Status" where the text is either, A, W, C. There is a form to update this field; currently it uses a standard Access created text field. The users want a checkbox which will show up as checked when the status is W, if the status is anything else, the checkbox will be blank. If the user clicks the checkbox within the form the status will be changed to W.
If [table.status] = 'W' then checkbox = 0 else checkbox = -1