An unbound field on a form to:


Hello,
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?


Sponsored Links:



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)?

Thanks,

KMS




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.

Regards,
CS.




Hi,

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?

Cheers
Will




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
.ActiveDocument.Bookmarks("fieldname").Select
.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)

Gerry




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)

Hi,

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 , , , "amanda.pena@ge.com", , , 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

-----
Steve




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
Else
If Lresult = "TR" Then
Me![Contract Status] = 2
'2 Completed

End If
End If
End If




Hi,
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.

Example:

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.