I'm new to access and I'm struggling with the transfer of a form we use for fieldwork. I want a technician to be able to come in from the field and enter data in a way that is visually similar to how the collected it. To do this, I have created a form that is structured like this:
View 1 View 2 View3 View4
Sediment % XX XX XX XX
In the table 'results' , I would like to collate the information in what I call 'flat format', which is structured like so:
Site Date Parameter Value
XX XX SedimentView1 XX
XX XX SedimentView2 XX
...
The thing is, I can only figure out how to assign a text box to a single field, i.e. value. What I need is for the field 'Parameter' to autofill based on the value-textbox name, e.g SedimentView1. Is there some simple way to do this?
I have a combobox which has 2 values: "kids" and "adults".
When the user selects item "kids", a textbox should display record from table named kids.And when the user selects item "adults", the textbox should display record from table named adults.
Not sure whats going on here, nothing on the table that stops this from working. I just get Run-time error "2448 You can't assign a value to this object" When the code runs.
Code: Private Sub Form_Open(Cancel As Integer) Dim rst As DAO.Recordset MySQL = " Select max(ID) from TblUserQry" Set rst = CurrentDb.OpenRecordset(MySQL) Myid = rst.Fields(0) + Int(Rnd(1) * 10) Me.txtMyID.Value = Myid
I have a problem in doing a task with my form. Actually I have a button to add a new record which opens a new form there i enter the values to the record. But when I press the Addnew record button I want to calculate the maximum of the Identity field +1 and open the new form with that new number which i have calculated. How can i do this....
I have a date textbox (Week_Ending) and number textbox (Staff_ID) in a form (frmHourEnter), when both have values I open another form (frmStaffReport) with textboxes (txtDateStart and cmbStaff).
How do I open the second form with the values of the first form pre-entered?
I have a database for billing. In my database, I have a form that consists of a main form "Order" and 2 subforms "OrderDetails" and "Customer" OrderDetails are to enter the products to be connected to the Order. All function super, but I want to have some information from one of the forms "copied" over to on of the others.
Here is what I would like
In the subform "OrderDetails" I have made a textbox that summarize all prices to a total, his tekstbox i called "Tekst31". I would like the amount in this textbox to appear in a field "Bel�b" in the main form "Order".
I have tried some different commands, but nothing has worked, also I have made a query which dose the same ting as the tekstboks, as the information in that tekstbox it not stored anywhere.
I have an unbound form, with a subform datasheet (sfmStaffDS) - not linked to the parent form, which displays a list of all staff. There is another subform (sfmStaff), which displays data based on a field in the form which takes its value from the DA subform.To add a staff member I press the button and this clears the fields down as expected.
However, when I start entering data (in the First NAme field), I get the error as stated in the title. Interestingly, I can carry on and the data gets saved as 'normal'.I have used this technique before with success, except that the DS subform is linked to a value on the parent form.
I am total green in access specially in VBA world and trying to learn during my free time..I am able to learn to learn how to assign values to LISTBOX, based on already created Query (using Wizard).Now I am trying to learn, HOW to create the query through VBA and assign to listbox instead of first creating query..What exactly I am trying to learn is upon opening of the my listbox show already existed records (for information)
Following the information tlb name = Currency tlbfield1=Currencycode tlbfield2=Currencyname
I'm building a simple database for storing records about books.
I'm currently working on one of the data entry forms. Part of this form is supposed to enable the user to add details about the book and the series that it belongs to (if it does belong to one).
The relationship is One-to-Many: One series can have many books. I've made the series part a sub form.
When I enter some data to test that it works, I get an error message when I try to add a new series using the sub form. It says:
"You can't assign a value to this object. *The object may be a control on a read-only form. *The object may be on a form that is open in Design view. *The value may be too large for this field."
As far as I know there isn't anything wrong, so I'm not certain why this error message comes up. I think it may have something to do with the primary key being the AutoNumber data type, but I just click 'OK' and ignore it, and it works fine.
The database works as far as I can see, I just want the error message to stop appearing.
I have a text box on 'Forma' & a textbox (named text3) on 'Formb'. I want to copy the contents of the textbox from 'Formb' to the textbox on 'Forma'. I have used the following code in the textbox on 'Forma'....
=Forms![Formb]![Text3].text
This doesn't seem to be working whether both Forms are open or only 'Forma'. Could somebody please advise as to what I am missing. Your assistance is very much appreciated.
Auto number will not work for what I want to do. I am creating a simple database that will assign the user with the next incremental number in a field. The intent of the database is for the user to enter three text fields and then obtain the number. I believe that Dmax would work but do not know how to make populate the table.
I have a form called departments . one that form i have 5 buttons. I want this form only to open when some logs onto the database . The buttons represent each department ...
1. sales 2 purchasing etc etc
Is it possible to assign a password to those buttons so each department has security to their own form ...
I am using a basic Order form and Order Details subform to capture my information. Customer is selected, then Products and Quantities are filled in... the subform calculates the total price. This all works great. Then I have a problem.
I have some national customers that require shipping to multi regions. I would need to select the regions and it has to calculate a new case cost for each product for each area. Could be up to 100 (10 products x 10 areas) new calculated prices.
Then for other customers, I will use just the case cost for the whole order (multiple products) and add one shipping fee to cover the drop. 3 products and only 1 fee added to the total.
Currently, my Order Form uses a Tab page and the Order Details are on the first tab. I could put the Shipping Info on the second tab, I just don't know how to add up to 10 different shipping regions to generate 10 new prices or the one drop fee to the total price.
I am working with textbox [DispCD] (a date field) on form [Contract]. There is a dropdown on combobox [Searchbox] for selecting the desired record. I am writing VBA in the [Searchbox] OnChange event. The control source for [DispCD] would normally be "=Searchbox.column(11)". If "column(11)" has a date, I want [DispCD] to show that date and then be locked. If "column(11)" does NOT have a date, I want [DispCD] to allow entry of a date with the date picker showing. I've tried to assign the control source to [DispCD] with this:
CSVal = Format(Forms![Contract]!SearchBox.Column(11), "ddd m/d/yyyy") (this works) If CSVal = "" Then _ Forms![Contract]!DispCD.countrolsource = "=SearchBox.Column(11)"
I get "Object doesn't support this property or method" error.
The code I am modifying looping through Me.controls collection to identify appropriate control types. Is there a way to influence the order (sequence) of that traversing? Or in different words, is there a way to assign by design certain item number to a given control?
I have a linked table in ms access and it has a column as details. in ms access when i click on this button i will go to another form. i want to assign a picture (for opening a form) to this column but i don't know how i have to do this. my form opens as a datasheet view.
Is it possible to assign a query to the recordsource of a form dynamically? I assume the answer is yes. Can this action be done when the form is not open? If yes what is the correct syntax to use when the code is in a normal module as a public sub? I tried many possibilities and could not get it to work.
Code: Dim ForNm as string Dim Qry as string ForNm = "PersonalFm" Forms(ForNm).Recordsource = Qry Forms![PersonalFm].Recordsource = Qry [Forms]![PersonalFm].Form.Recordsource = Qry
What I want to be able to do is to assign a back colour to a control from VBA. There are many colours and what I thought would be an easy process was to choose a suitable colour to be assigned using the colour picker for a control, note the hex number then in my vba code would be
if... then me.mycontrol.backcolor=&HF0AD34
This compiles OK, but produces a completely different colour - I'm expecting an orange colour but getting blue and in another example a pale blue is coming out a brown.
Research indicates adding an ampersand to the end changes the value from integer to long but if I type
if... then me.mycontrol.backcolor=&HF0AD34&
The second ampersand disappears. In the immediate window
All produce the same value of 15772980, which if I copy back to the control backcolour property produces the blue colour and not the required orange - which if i debug.print me.mycontrol.backcolor give me 3452400 - the correct number for orange.
The problem seems to be converting the hex number to a long.
Also how to modify the properties window to show the decimal value rather than the hex value, but can't see anywhere to do this.
I currently have two froms, "add record" and "add record cont." The reason I have two seperate forms is because when clients create a new record information needs to be saved to two different tables and when creating one from with fields from both tables I ran into many problems. The two tables are named : tblMain, tblFileLoc Currently there is a textbox on both forms named "fileID" the FileID in the first form is from tblMain and is the primary key for that table, the FileID on the second form "Add Record Cont." is just a normal field. When clients enter in the new FileID in the first form "Add Record" and then move onto the next form "Add Record Cont." i need access to bring the entered FileID from the first form and Fill it in the FileID field in the second form. Currently I have tried making the control source for the textbox on the second form = the textbox on the first form but it brought up an error.
I am relatively new to Access and VB. I am trying to create a log-in system that assigns a security clearance to each user and then restricts access to certain forms and reports based on security clearance. Right now, I have set up the log-in system - that seems to work fine. But when I try to lock the form based on security clearance, I get the 2450 - Form Not Found - error.
The code I am using on the form is as follows:
Private Sub Form_Open (Cancel As Integer)
If Forms!frmLogin!cboUser.Column(4) <> 1 Then MsgBox "You do not have access to this form", vbOkOnly DoCmd.Close acForm, "formname" EndIf
I am building a database through access 2003 and have included a text box labeled "comments" in my design view. Now when i go to input information in the "comments" column in the datasheet view, the same text will appear for every entry. If I try to change the text in the next row, it will automatically switch all of the previous "comment" text to whatever I have entered. How do I fix this?
Right what im after sounds complicated but its quite simple.
I have a client database, in this database each client has 3 skill fields, i also have a form with a listbox and an unbound textboxes that are linked to the query so when the textbox is typed in the listbox updates.
Now ive sorted out the problem of not all fields showing it some of them are blank now the problem is.
When input text into one of the boxes the listupdates, now if theres text in two boxes. and theres data in one of each that matches it will show neither, because the query is looking for data that matches in both fields, now i need partial matches so it will give results of data in both fields.
not understanding fully what i mean?
i have zipped my db, if you open the db then open the form 'MainListRecTrades2nd' and fill in data in both primary and secondary trades that matches from the list you will see.
http://awilderbeast.com/CWSystem.zip
The solution i was thinking of would to have 1 textbox that searches all the fields and displays data from any of the fields in the list