Hello! I'm trying to assign a number to a set of rows so I can, essentially, create a dual primary key on a table. Below is an example of what I have...
The numbers are just "student numbers" if you will. Something that identifies them. The second column is basically the name of a course. What I would like to do is number each row, but only within the group of that individual.
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.
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?
My access database is used to process vehicle trips. Each shift, a vehicle is assigned a docket number (paper based), and on this docket the driver fills out each trip he/she makes. In a shift (thus on a docket) there may be 5 - 15 trips. I want to create an incrementing number for each trip in a new field - can be created as they are processed or after the fact by looping through the resultant data - whatever is easier.
So in simple terms, return all trips for each docket number then number each trip.
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 have written a check writer program for the company I work at. I have a table for Venders, and a separate table Invoices set with a 1-many relationship. When checks are printed it consolidates all the unpaid invoices for each vender to print a single check and mark it as paid with the date.
The checks already have a check number printed on them so what I need is an option that will allow me to enter the first check number when the print starts and Access will put that number in a field on the invoices page for each invoice associated with the first vender printed, then would increase the number by one and put that number in the invoices associated with the next vender printed.
I keep getting this message when I try and input a product ID in the subform in my 'Order Form', the message says 'you can't assign a value to this object' and when i try to click the row below it says 'You cannot add or change a record because a related record is required in table 'Invoices'', how can I change this? do i have to relate it to the Products table and if so how do i do this? Thanks, Bob.
System Link: Gamez System (http://www.savefile.com/files/5147388)
I want to create a function module or something similar which will assign a variable to the max invoice # used on that table, using sql if possible. I tried something like this, but it's not working.
Public Function max()
Dim maxinvoice As String
maxinvoice = "SELECT Max(tbl_original.invoice) AS MaxOfinvoice" & _ "FROM tbl_original;"
MsgBox maxinvoice
End Function
I would like the msgbox to popup saying "5", since that is the max invoice # used based on the above table.
I don't have too much experience using modules on their own without forms and variables on the form to assign to, can someone make a suggestion?
I have a frm called frmaddprovider Main form see database I Also i have subform called frmsubformproviderids with 2 command buttons Add Provider ID and Refresh data
When i generate a report by selecting insurance name, insurance id, from the table called tbladdinsurance and also select Provider, Pin from the table called tblproviderids
When i generate the report as you can see by the sample database only insurances that are selected in the combo box shows up
How do I assign a default value so if the insurance combo box in the subform field is left blank it will automatically assign the Pin# to all insurances and when i generate the report it will show all insurances along with provider and Pin#
I keep getting this message when I try and input a product ID in the subform in my 'Order Form', the message says 'you can't assign a value to this object' please have a look at it, thanks. Gamez System (http://www.savefile.com/files/4823667)
Greetings, all. Run into a snag with a payroll db, appreciate any help you can give me.
Main Form, with ordinary payroll/personnel info--clock no, first and last names, S.S.no., etc. Subform for entering regular hours worked, OT hours worked, etc per Period Ending, keyed to main form by SS no. Pretty basic stuff.
Problem is, when we try to enter the first data in the subform, we get this error message : "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."
We get the message in the first field we go to, no matter which field we go to first. None of the "may be" conditions apply.
When we hit "OK" the message goes away and we can enter our data, the records are created corrected. But as soon as we move to the next record, we get the same error.
I have been pulling my hair out (OK, I would be if I had enough to do so) over trying to assign a value to a control on a form. Basically, when a change is made to the form, I'm using the AfterUpdate event to trigger the code. The code in the event is
Me.txtWho = Environ("UserName")
Simple, straightforward or so I thought. Problem is, it gives me an error stating I cant' assign a value to that object. txtWho is bound to a field in the query underlying the form and the control is enabled and not locked. Can anyone shed some light on this for me please????
Hi, all! I'm working on another project and need some advice.
I've got a form where users enter items that will be listed in a budget report. This budget report is submitted to the client for approval. Once approved, these items need to be entered into a PO (purchase order) form and report. There is a checkbox that says approved for PO on the budget form for each record.
What I'm looking for is a way to group the records (that have been approved for purchase) together by vendor, and assign them PO #'s. I know that the end result will be doing an append query that will throw all the records into the PO table, but I don't know how to get the grouping and everything to work.
Does this question make sense? If not, please let me know what info you need. I really need help with this. Any ideas? Thanks!
I have a simple combo box with two options - elective and emergency. They are set up on a continuous form. When i try to choose a value it comes up with the message "You cannot assign a value to this object". I have checked the three criteria it mentions, object being on a form open in design view (no), value too large for field (no - text field with (defaulted) size of 50), control on a read -only form (no, form is editable). The strange thing is as soon as you clear the error message box it lets you enter the value anyway. Any ideas?
Hi, in my database I have a 7 subforms that shows fields for daily tasks for each day of the week. On the Monday, the tasks are assigned and then stored for every record for the corresponding date. The process is done again on tuesday, then wednesday etc. However, often the daily tasks for say tuesday will be very similar (sometimes the same) to that of monday's.
Therefore is there a way to set the default values for each day as the previous days tasks and then alter them if needed?
SOLVED: Hows it goin?I need to assign a second primary key to a table involving three fields (Student Number, Subject Code and Average). I have to make Student Number and Subject code the primary keys. Any help would be appriciated.
the part of statement highlighted in red ...is the value for the filed value_settled whose data type is yes/no..
now i am confused with thise highlighted part..will it assign the 0 to G_value_os or first use the original value of G_value_os to insert the value into database... please help me...
I have searched the forums and I don't see this problem. I have a split database. When I test it it works fine. It resides on a network drives and permissions have been checked. When users try it they get an error message that says "you can't assign a value to this object". This occurs after they have selected a project and the user form opens. The user form appears blank.
I have gone to other offices and if I am signed on to their machines it works but if they are the message comes up. I'm at a complete loss and need some advice. It's probably as plain as the nose on my face but I've been struggling for days.
By the way - I used to be Mrs.Meeker...I haven't been around for a long time.
I've tried searching the forum to no avail, I have a table (tblBarcodes) that has two fields, Barcode & Material The Barcode field is already populated with specific numbers, but what I need to do is when I enter a new material on my form it will assign it a barcode from the tblBarcode and then append the Material code to the that table against the relevant record.
I was wondering if anyone could help me with a problem I'm having with a form...
I have 2 tables, one called 'dept' and the other called 'employee.' These tables have a one-to-many relationship; basically, one department to many employees.
Instead of using a combo box, how do I assign an employee (employee_table) to a department (dept_table) by simply selecting a checkbox on a tabular (employee) form and the record is automatically added to the dept table?
I have an export query that has number of distribution and CM distribution for invoices generated. The objective is to count the number of invoices based on the account number for each customer ID. Since the table has no primary key, the I assigned field number of distribution to 0 in hopes the counter will assign the value of the row number. The attached file shows how the current export displays and how it should display in the highlighted correct way section. I tried COUNT and DCOUNT methods which is the current setup, and they aren't working. This will eliminate the need to go into the file and change the 2 fields.
I am trying to use Access 2007 popup calendar to populate a combo box with a selected date. When I select the date on the calendar the above error appears.
Code:
Private Sub Calendar9_Click() 'Set Date to the selected date and hide the clalendar. MAssBDate.Value = Calendar9.Value MAssBDate.SetFocus Calendar9.Visible = False End Sub