An unbound field on a form to:

I need to know how can I make an unbound field on a form that will have a value of: eg: 500
and the next time I will open it, it will be 501
the time after, 502
and so on and so forth.

This form isn't based on a table, so I cannot do it with autonumber, I need to be able to do that on a designed form.

Macro maybe? Can someone please assist?

Post your answer or comment

comments powered by Disqus
Is there a way to clear an unbound field on a form from a macro? My form takes input from unbound fields and appends that data to a table. I want to clear those fields and requery the DB after the append from a button. Is there a way to do this without VB code (I'm not great at VB)?



Dear all interested in any suggestions to the following. (Access 2003)

I have a Form primarily that records no information. I e it doesn't draw the majority of its information from a table or a query. It is used as a Calculator and there are a number of factors that it calculates out primarily from unbound fields entered when the form is open.

Everytime someone goes into it they can enter 7 parameters that are taken and multiplied to a series of further records to give an overall bill.

It is actually quite important that this is not recorded in this way it is a true application (just like a calculator). It would be nice however that on occasion that people can print out the calculations once they have finished making the calculation. Hence the report option.

Report wizard gives me the opportunity to create reports from Queries or Tables but I don't see an option for example for to include unbound fields from a form in a report.

Anyone got any ideas how I should go about creating a report of this form?

I suppose I could make the unbound fields into a table and delete it every time but would prefer not to.

I have a continuous form (as a subform) which displays all the records in tblParts. For each part, I want to lookup the Quantity that may have been ordered (in TblItems) and display it next to the Part in an unbound field on the form. I am doing this using a DLookup at Form_current. Everything is fine except that the Quantity shows the same for every part (the quantity for the first one). If I then click on a part -not the first one - the Quantity on every line changes to that lookup value. Is there some way to do the Lookup for each row?

I have several calculated fields on a form, with the same name to the table. I need to get the calculation to write to the table. I have tried queries with no success. Maybe I am writing them wrong. I have tried an action macro with no success. Please help!!!!

in my form I created an unbound field with a requested combination, now how can I put those in a table field.
in other words, how can I send the content of a form's unbound field to a field in the table?

your help is very appreciated.



I have a form with a 1-many relationship between 2 tables.

On the subform I have contacts, and the main form I have request.

Each request can have many contacts.

Now I want to put an unbound field on my form to show how many contacts there are currently relating to that request.

So if I have 5 contacts, then the calculation will count them.

Tried varies counts to no avail.

Fields are:

Request_tbl - PK referenceID

Contacts_tbl - PK requestContactID, FK requestID.

So basically count the number of reuqestIDs relating to that particular requestContactID.

Any help before I knock off?


Hi there, I have a report based on a crosstab query, which lists students attendance figures. There are aprox 2800 students listed in the query. The problem I am having is that I cant seem to set a linkcriteria from an unbound field on a form to filter the data on the report.

Every student has their details on a single page on the report, and I would liketo filter by: INV student, tutor, faculty, centre etc. I have created list boxs and combo boxs (based on queries) with the required data needed to link to the report, (I have used this method before on other reports not based on crosstabs)but I keep getting the error message "Jet engine does not recognise <field name> as a valid field name or expression. This has got me really stumped as I have used linkcrieria's as strings to open filter reports many times in the system without any problems.

Does anyone know if this is due to the report being based on a crosstab query? I cant seem to find any literature that can help me on this subject. Any help would be greatly appreciated.

Thanks in advance, Barry Graham

Trying to merge a field on a form to a word document using
.Selection.Text = (CStr(Forms![frmMain]![subfrmMainCompetitor].Form![fieldname]))

The field in question is a combo box and all that is being merged to the word doc is the bound column number and not the field contents.

Any ideas?

I would like to know how to get the sum total of 2 fields on a form to show in a third field i.e. [NumHrs]*[PayRate]. I have tried quite afew ways to do this but i am getting nowhere and i am frustrated (the fields are combo boxes)


I am sure this is possible but not sure how to go about this. I have a form that has a memo field with values in a particular format. For example: 11111-2222-33; 44444-5555-00 etc... This memo field could contain one or many values. I have a pop-up window that displays when a user double clicks this memo field that provides an input field that has an input mask of AAAAA-AAAA-AA;0; so the user will enter the values in the correct format. On this pop-up form, I have an unbound field that caputures the the entries. I would like for the values captured in this unbound field to be copied to the original memo field in the open form.

The original open form is: frmQuestionDetail
the field name is: NDC

the popup form is: frmNDCentry
and the field is: NDCupdate

So essentially, I am trying to copy the value from NDCupdate from frmNDCentry to the NDC field in the open form frmQuestionDetail.

Thanks for any help.

(Access 2010)


I have a table with 22 fields:

- 1 ID (autonumber)
- 1 Date (date/time)
- 10 x reportnumber (text)
- 10 x description (text)

I also have a form to populate this table.

I would like an unbound textbox on the form to tell me the number of reportnumbers I have entered on the form (maybe On Got Focus or something like that).

How would I go about this!?

Many thanks!

I have a form that users enter car registration numbers on. As well as storing the number on theunderlying table, I want to store the first 3 digits of this number within the table in another field. I have tried creating an unbound field on the form to calculate the first 3 using left$([regnumber],3) which works OK but am having difficulties working out how to save this value in the table. (I will eventually use this 3 digit value to be the basis of a relationship with another form). I am sure I am missing something basic here, patience please if it is obvious!

I have searched this site and found a lot of information that pertains to this topic but I try and try and try and i cant get this to work.

This is the problem. I have this form that users fill out in Access 2K and once they are done i want them to be able to send an email notification (we use outlook) to a foreman that new parts are ready. But for the life of me i cant get the body to include fields on the form that the user inputed (i hope thats a word).

I am using this code:

Private Sub Command95_Click()

Dim strBody As String, strSubject As String
srtSubject = "New NDT Request Added"
strBody = "A new request had been added by [employee]. The [jobid] job is a [partdescription] needed on [needdate]."

DoCmd.SendObject , , , "", , , srtSubject, strBody
End Sub

Where employee, jobid, partdescription, and needdate are all fields on a form called frmndt.

Any help would be great.

Hi, the title says it all.

I have been trying this but i cannot figure out how to do it, I would like to know how to fill in a field on a form with the current time by clicking a button/macro.

Thanks in advance for anyone who can help me.
Much appreciated


I have a contract control number that starts with either AB or TR when it's AB in the "ContractControlNum" field I want the "Contract Status" fields on the form to return 1 and likewise when it's "TR" I want it to return 2.
I place the code below in the "On Current" on the form and it only works when I reopen the form, Not Ideal.
I tryed on After update on the form and nothing.
I tryed on After update on the ContractControlNum field an nothing changed either.
I know the code works just don't know where it should reside!

I'm at a loss for why this does not work.

Dim Lresult As String
If Not IsNull(Me![ContractControlNum]) = True Then
Lresult = Left([ContractControlNum], 2)

If Lresult = "AB" Then
Me![Contract Status] = 1
'1 = In Progress
If Lresult = "TR" Then
Me![Contract Status] = 2
'2 Completed

End If
End If
End If

I have a form with approx 75 fields, and a save button. Is there an easy way to save the content of ALL the fields on the form to a recordset table, or do i have to program each one line by line?
The table they are going to have exactly the same field names.......
Many thanks

I have a form that I need to have a field where the user can type text. I want to link that field to the "Criteria" field on a query that will then search for the text. I know how to do this by building an event in the query linking that field on the form to the criteria field on the query. The problem is I need the criteriea to also look at the text as a Like statement.

For example:

On the form, the user types in "Ice" to the text box text0

In the criteria field on the query I would like the search to look at text0 as a Like statement. So the criteria field would look like this

Like '*[Forms]![Query Name]![Text0]*' the idea being that the query would look for anything containing the word "Ice" in the text.

In my illogical mind this would work, but it is not. I am not sure if this is just a formating issue or if what I am trying to do is not possible.

The records I am performing the search on ar over 400k records. So I cannot create a list box, It needs to be searchable somehow but simple for the user. Any thoughts would be much appreciated.

I'm trying to see if is it possible to only "lock/unlock" parts of a specific field on a form.


I have a field called CCN with the value of 99-11-001-777-888.

I have code that locks the field based on a users access level in the Security table. What I need to see is if it is possible to unlock only a portion of this field, while retaining the lock on the rest of the field.

Example: I would like certain users to be able to update the "99", "777", & "888" portions of the above example while retaining a lock/preventing changes of the "11" & "001" fields.

Is this even possible and if so, how would I tackle this?

I don't know how to get around this without creating unnecessary fields on a form! I need to give the user the opportunity to enter information into multiple fields depending on the record. For example, a particular record might require 5 dates (date1, date2, date3, date4, date5) and the form will need to allow him/her to enter these on the form. In other cases, the record might only require one date (date1) and the other four would be superfluous. I work in TV (to give some contex) and some programs will have one air date while others will have more than one. Each field will essentially perform the same function. How do I create a form that caters itself to each individual record? I hope this makes sense. What I don't want to do is take up unnecessary room on the form with 5+ date spaces when there won't always be need for one. GOD! It's even hard to explain in writing. Please help! Feel free to send an email, too, and I'll try to be clearer.

here is the situation.....

I have this field on a form that users key into and when the click apply, the record is stored in a table. Sometimes they will not need to use this particular field.

As it is now, if they leave it blank, an error will occur. The filed is a short date field, I have the table and the form input box formatted as such.

Basically, I want to have a radio button that turns this on/off and then the user can fill out the field if needed.


Option Compare Database
Option Explicit

Private Sub apply_Click()

If IsNull(Me!rr) Then
MsgBox "You must place values in all fields."

ElseIf IsNull(Me!rc) Then
MsgBox "You must place values in all fields."

ElseIf IsNull(Me!time) Then
MsgBox "You must place values in all fields."


DoCmd.RunSQL "INSERT INTO tbldtc(tbldtc_date, tbldtc_user, tbldtc_num_req_rec, tbldtc_num_req_pro, tbldtc_time, tbldtc_oldest_date) VALUES ('" & & "','" & Me.user & "','" & Me.rr & "','" & Me.rc & "','" & Me.time & "','" & Me.old & "')"
MsgBox "Your data has been saved."
Exit Sub
End If

End Sub

Private Sub Command24_Click()
End Sub

Private Sub Form_Open(Cancel As Integer)

End Sub

I'm self-taught, but have made good progress on my database with the help of this board.

My question this time is to understand how to make the fields displayed on a form dependent on some other condition. If that is even possible ??

In Table1, each organisation is given a score for each of 10 parameters. The top five scoring parameters are indicated (manually) as such by a yes/no field. The Top5 parameters are not always the same ones out of the 10. The Top5 vary from one organisation to another. In Table1 there are 10 columns for the parameters.

In another part of my database (Table2), I now want to enter some additional scores for each organisation - but only for the Top5 parameters. So, the same basic 10 parameters are consistent, its just that the Top5 (which are a different set each time), are now receiving additional scores. I have set Table2 up to have 10 columns for the 10 parameters, but only 5 of the columns are going to receive scores.

In the Form for collecting the additional scores, how do I go about displaying only the Top 5 parameters as indicated by the yes/no fields. And how do I make sure the scores fromthe form go into the right columns in the table.

Or have I gone about it in completely the wrong way ?


I need to check all fields on a form, which is a considerable number, and update another field if any of the data in the record gets changed. I don't want to use the change event of each field on the form (Form has a tab control with 5 tabs, all full of fields) so basically if someone checks a box, adds text, deletes text, whatever, I want to make my "CHANGED" field (yes/no) = "Yes"

Is there an event or property associated with the form that will track that for me or do I actually have to use the "Changed" event on every single field?

Any help will be greatly appreciated.

I am working on a database that uses dates for testing purposes. I eventually will have a query to find those dates, but in the mean time, I would like to have a check box, when checked, put a date into another field on the form. There are three check boxes that need to calculate different dates. Such as one for 365 days, one for 180 days and one for 92 days and show in the same field on a form. Is this possible? Any help is appreciated, Thank you.

Hi All,

I have an unbound field on a report with the following data source..

The '100' value will be replaced by something more significant once this gets working. Basicaly, it's a financial report looking at values of invoices.

How do i add up to total sum of these details in the footer of a report? Is it possible to SUM on an unbound field, because what field source do you use?

Hoping someone can help !

Not finding an answer? Try a Google search.