How To Make Form Txtbox = Multilpe Fields?

Jun 17, 2005

Having had a pretty good look around, I think I must have missed something...

I just want to try and make a Forms single Address textbox = multiple table fields values:

Add1
Add2
Add3
PostCode

Cheers,

Pailin

View Replies


ADVERTISEMENT

Date Criteria From A Form's Txtbox

Aug 20, 2007

Hi all,
I have a select query that pulls in two date values from a textbox on a form.

SELECT DISTINCT Table01.SRV_NAME, Table01.IMP_CUTOFF_DT
FROM Table02 INNER JOIN Table01 ON Table02.Servicer = Table01.SRV_NAME
WHERE (((Table01.IMP_CUTOFF_DT)=[forms]![frmreport].[txtsqldate].[value]))
ORDER BY Table01.SRV_NAME;

However when I run it I get the following error message:"This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may...." but when I copy and paste the value of that txbox from the form into the query it works fine.

Can anyone see where the problem lies? I can't work it out.

Thanks in advance,
Mitch....

View 5 Replies View Related

How To Make Fields In Form Non-editable

Mar 6, 2007

Hi,

how do i make the fields in my form uneditable(cannot delete or add but can copy a field from form), i tried setting the properties..allow additions deletions by setting it to no, but even then when i open the form and when data is dispalyed , if i go jus delete (say address field)a field it just gets deletd,
i tried locking the fields too!..nothing worked,
so how do i do this,?
p.s IF i set allow edits to No then i am not able to copy the field (say name has to be copied and pasted into another application or something) how could this be accomplished.
tried setting it in VBA as formname.form.allowdeletions=false , still no luck!

Pls help!
Thanks!

View 2 Replies View Related

Forms :: Can Make Form Based On Fields From 2 Tables?

Feb 15, 2014

I have created simple data base containing 2 tables connected each other and I wanted to make a form with fields taken from those tables and unfortunately it did not work and I got errors message.

Before I start to build the form do I need to create the query based on those tables and having the fields I need for the form? If yes, what sort of query, simplest one?

View 6 Replies View Related

Forms :: Locked Checkbox To Make Form Fields Not Editable

Apr 3, 2013

I am using Access 2010 and I have my tables hidden in the navigation pane (I don't have any concerns about users finding the tables to make edits), however I am looking to "lock" all fields on a form once a user saves the record. The concern is that when they go to enter a new record they may end up on a previous record and overwrite the information. My thought was to create a checkbox on the table that I can edit each week to lock records. At that point, what type of code can I create or use that will lock records on the form?

View 2 Replies View Related

Choosing Fields From Combo Box To Make Fields Visible

Aug 30, 2004

I have a combo box linked to a look-up table. There are 8 fields in the look-up table but only if one of three is chosen do I want additional combo boxes to become visible. Do I put the code in the "after update" or "on change" event of the combo box and how do I express the code-

If TechniqueCombo="caudal" or "spinal" or "epidural" then
TextNeedleType.Visible=True

(am I close??)

Thanks

View 4 Replies View Related

Grey-out Txtbox

Mar 30, 2006

I have a form that has several fields that a user will enter data. When finished, the data is inserted into a table. Works great. What I want to do now is look at one of the fields entered and if it is equal to a certain value, I want to disable one of the other text boxes (fields) on the form AND pop a screen that will allow the user to enter a list of names that will update a different table.

So, if user inputs a directory name GENERIC, the txtScriptName box needs to be disabled/greyed-out and I need a form to pop so the user can put in a list of script names. If any other directory name is entered, the txtScriptName box needs to remain editable. (For directories equal to GENERIC, there will be multiple script names instead of just one)

I've been successful at getting the form to pop if GENERIC is entered but can't figure out how to grey-out the txtScriptName field. I tried using Me.txtScriptName Locked in the Before Update of the preceding field but it didn't work - could still update the txtScriptName field.

Any other sugestions?

Thanks!
Mary

View 1 Replies View Related

Select Between (Date) AND In TxtBox

Jul 4, 2005

Hello,

I'm trying to make a report query work but with no succes so far. Can anyone please help me?
I've got a multiselect listbox and a txtbox (txtCursisten) where the results from the multiselect listbox appear.
I want to get the results out of a table (tblAbsentie) where I can set a start and end date AND use the people selected in the txtBox. So far I've got a NOT working query, a report based on the query and a button on my form.

The VB code behind the "show report" button is this:

Private Sub cmdAbsentiePerCursistPerPeriode_Click()

On Error GoTo Err_cmdAbsentiePerCursistPerPeriode_Click

Dim db As Database
Dim Q As QueryDef
Dim sql As String



If IsNull("Me.txtCursisten") Or Me.txtCursisten = "" Then
Exit Sub
Else

Set db = currentdb()
Set Q = db.QueryDefs("qryAbsentiePerCursistPerPeriode")
Q.sql = "SELECT tblCursist.Naam, tblAbsentie.Datum, tblAbsentie.Lesuur, tblAbsentie.AantalLesuren, tblAbsentie.Deelkwalificatie, tblAbsentie.Docent, tblAbsentie.Gemotiveerd, tblAbsentie.Reden, tblAbsentie.Status, qryCountLesuren.SumOfAantalLesuren" & _
"FROM (tblCursist INNER JOIN qryCountLesuren ON tblCursist.OVnr=qryCountLesuren.OVnr) INNER JOIN tblAbsentie ON tblCursist.OVnr=tblAbsentie.OVnr" & _
"WHERE (((tblAbsentie.Datum) Between [Voer begindatum in] And [Voer einddatum in]) AND ((tblAbsentie.OVnr) In ("Me!txtCursisten"))); "
Q.Close

DoCmd.OpenReport "rptAbsentiePerCursistPerPeriode", acPreview
End If

On Error GoTo 0
Exit Sub

Exit_cmdAbsentiePerCursistPerPeriode_Click:
Exit Sub

Err_cmdAbsentiePerCursistPerPeriode_Click:
MsgBox "Selecteer klas en cursist(en)."
Resume Exit_cmdAbsentiePerCursistPerPeriode_Click

End Sub

I get a syntax error when pressing the button. Please help...
SeBasTiaan

View 3 Replies View Related

Insert The Value From A Txtbox Into A Table

Sep 15, 2005

Hi there

Can someone give me a basic example.

I have a form that contains a textbox and a listbox. The listboxs rowsource is tblSPNZ.
The table has 2 fields 1 is and autonumber and the other is where I want the results to go.

How do I make a command button populate the table? Avoiding putting any results into the autonumber field?


Thank you for your help.

View 11 Replies View Related

Txtbox Ctrlsource = Query Question

Dec 14, 2006

I have a form, on the form a textbox. Through the expression builder I have assigned one value to the control source of that textbox from a query. The query holds three values, all three of which I would like to use in a separate textbox. When I open the form the textbox just displays #Name. I'm guessing since nothing is happening because the query isn't run by command yet. I've used code like this:

Private Sub AppointmentID_Click()
Forms![ClientsMain]![TechViewSummarySubForm].Form.Requery
Forms![ClientsMain]![TechViewSummarySubForm].Form.Refresh
End Sub

to get a query to open, run etc. But that one is located in a subform which has the query as a control source. How does that work in the case I have now? Can I use the DoCmd function to run the query and get a value from it for the specific textbox? Or can't I use a (segment of a) query as the controlsource of a textbox at all?

I'm asking this since now I calculate and store certain totals by use of a textbox with =Sum() as control source in the footer of a form, which values I then assign to some fields in a table.

But I would also like to learn the right way, using queries, maybe for a later version of my DB when my skills have improved. I've been struggling with this now for a bit, but without succes. So that's why I wonder if I can assign a query or more specific one value of a couple of values in a query to a textbox in a form which has a totally different control source itself.

View 3 Replies View Related

Validation Rule For Length Of TxtBox

Jun 27, 2005

Here's a bit of a pickle I've been trying to wrap my noodle around.

Anyone have an idea what route to pursue (unbound form, or afterupdate, etc?) to force a validation rule on the number of characters in a text box based on the value of combobox in the same form.

Example:
If cboBox1 = 840, then len(txtBox2) = 6
But if cboBox1 = 820, then len(txtBox2) = 3
And so forth?

Thanks,
~Chad

View 5 Replies View Related

Replace Data From Txtbox To Subform

Oct 3, 2006

friends, a small question.

I have placed a txtbox on my form and via a cmdbutton a can copy data to another text box. Is there a way I can replace data? Will appreciate any help.

View 4 Replies View Related

Update TxtBox With Combobox Description And Not ID?

Jun 7, 2014

I have a form that has a combobox and a field text. If i select any value in combobox i want to update the txtBox but not with the ID of the selection. I need to get the description of the combobox selection which is essentially the Column 2.

View 3 Replies View Related

Counting Columns And Storing Result In TxtBox

May 18, 2007

Hello,

In a form I have "txtBoxA". I would like store the number of records from table "A" based on a specific field into "txtBoxA".

Ex:
Table 'A' fields: QuoteID, Date, GenerateOrder

What would be the exact syntax for this??
The following code is not working

Me.txtBoxA.Value = DoCmd.RunSQL ("SELECT COUNT(GenerateOrder) FROM A")

Thanks

View 2 Replies View Related

Populate A Bound TxtBox And Not Have It Update Table?

Mar 12, 2008

It's an unusual request, I know, but it's necessary for my purpose.

I have a form, frmMain that I use to update a number of tables. On it is a number of combo boxs, comProduct, comBrand, comSize, comPrice and comQuantity. comProduct opens a new form, frmNew if the users input is not already in the table. On frmNew there are again combo boxes comProduct, comBrand and comSize. This form adds the record to the table.

So, if I input a new value - not already in the database - for product in the comProduct combo box, the form frmNew appears and I can proceed to define the product, brand and size of the new record. The form then closes and reopens frmMain and tabs across to comQuantity (skipping the fields I've already defined in frmNew).

Now if you can wrap your head around that, here is the problem: Because I've already entered the values for product, brand and size in frmNew, I want them to automatically appear in the appropriate combo boxs on the frmMain form. I've been using the following code (executed from frmNew, so Me = frmNew):

Code:[Forms]![frmMain].[comProduct] = Me.comProduct[Forms]![frmMain].[comSize] = Me.comSize[Forms]![frmMain].[comBrand] = Me.comBrand

It works, but I've since discovered it creates a new record in the table so I end up with two duplicate records (one when I submit frmNew and another when the values are automatically input into frmMain.)

Now, my question: How can I display these values in frmMain without having them create the second record? I was thinking of using a SELECT query somehow, but I don't know where to begin. I also considered using labels instead of comb boxes, but I'll need to be able to edit them if the record already exists.

View 3 Replies View Related

Queries :: Criteria Using DLookup String From Another Txtbox?

Aug 19, 2015

I have a table tblDateGroups, with two field, [Group] (like This Week, Next Week, Last Month, etc) and [Code] that holds the code for criteria for each group in a query. I know the code is fine (like next week = Between Date()-Weekday(Date())+8 and Date()-Weekday(Date())+14 ) because I tested before putting in the table.

On my form I have a combo box that list all the [Group] and i hidden textbox that looks up the code based on the cbx after update...all that is good.

However, when i try to requery the report the criteria is not working. I am simply using the date criteria to read the hidden text box with the code string.

Forms!frmMainHome!subaWelcome.Form!txtCodeForQuery .

the error code is "This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."

View 2 Replies View Related

How To Make Fields Talk To Each Other

Feb 24, 2005

hi, i am creating a website with flash, asp and an access database.
in my database i have a 'users' table with the fields, username, password, score, and access level.
the score is automatically set to '0' at the beginin,
as the user does various things on the site, it begins to adjust their score.
eg. they answer a quiz, and they get 7/10 so the 7 points are posted to the database, and the score is 7.
in my access level field, i have used the lookup wizard to have 3 options, level 1, level 2 and level 3.
what i want is the access level to automatically change for each user depending on their score.
so they start on access level 1, and once they reach 50 points, they get to access level 2, and past a 100, access level 3 if you see what i mean.
i will then be using these levels to restrict certain users from certain pages.
just wanted to know how this can be done in my simple ms access database.
thanks

View 5 Replies View Related

Make Fields Active

Apr 3, 2006

hi all

I have a form that has invisible fields. Depending on the navigation to the form, those fields are turned on/off using the visible command.

However, the tab order on the form always takes the user to the first field visible on the form.

How can I tell access to default me a specific field first.

i.e. I have chosen to amend a training file via payroll number. I would like the payroll number data entry box to be the active field when the form opens.

Cheers

View 3 Replies View Related

Changing A TxtBox To A Check Box Or Similar, Based On A Field In Db

Feb 22, 2006

Hi.

I have

Form with 3 list boxes.
1st LB populates 2nd etc.

The 3rd LB value chooses a field.
The Fieldname Table has field "Field Type"

I want to change the Text box next to the List box to this entry in the Db.

Ie. If I choose a field in the LB, say "Done?", then to update that field it needs to offer me a "yes/no" field type
Therefore it changes the TextBox to a Checkbox (or combo with Yes and No as options)

Any ideas?

View 2 Replies View Related

Using Expressions To Display Value In Txtbox Based On Combo Selection

Aug 2, 2007

hi Guys

I would like to write an expression (i presume) to auto fill a text box based on the selection made from a combobox...can anyone help or point me to a tutorial that deals with this??

Many Thanks,

RF

View 10 Replies View Related

Make Query - Defining Fields

Mar 30, 2007

When I run this query, the fields in the new table contains 253 characters. How do I specify in the SQL command that the field Carg2 and Carg3 will contain 3 charachters ?

SELECT dbo_allesc.AccReport, Left([AccReport],2) AS Carg2, Left([AccReport],3) AS Carg3,.........................
INTO regTabell

Thank you, Tor

View 2 Replies View Related

How To Make Particular Fields Of One Record Equal The Value Of Another

Nov 14, 2012

I have created my first two tables ever.

The first is ClientList, which contains typical contact and biographical information (name, address, citizenship, etc), and unique ClientID# for each client. The primary key for this table is the default Autonumber ID that comes with each new table.

The second table is WillInfo, which contains information specific to drafting the client's Will (e.g., spouse name, spouse address, spouse citizenship, similar data on beneficiaries, similar data on executors, etc). The primary key for this table is ClientID#.

I then created a One-to-One relationship between ClientList and WillInfo, binding by Client ID. All this appears to work.

My question arises because I have two clients who are married to each other, which means much of the spouse info I require for the WillInfo table in respect of these particular clients is already accurately recorded as client info in the Clientlist table. So for these specific clients (but not generally!), I want the spouse information in the WillInfo table (e.g., SpouseAddress, SpouseCitizenship for ClientID# 12.001) to EQUAL specific values provided in the ClientInfo table (i.e., ClientAddress, ClientCitizenship for ClientID# 12.002).

I read and understand this is the best approach, following the principle that data should not be entered twice, so as to increase efficiency and avoid mistakes and future problems.

My question is: How do I do this? In Excel, if the client info I wanted to replicate was in cells B4-B9, I would enter =B4, or =B5, or =B6 and so on in the cells for spouse info. What is the equivalent expression for replicating specific client info from a different table.

View 7 Replies View Related

Combine 2 Fields To Make Email Address

Nov 22, 2006

I've spent about an hour searching this site for email issues but most I found we how to send. I want to take existing data and make an email address.
I have a FName field and an LName field. In my email field I want FName.LName@email.com. the @email.com will always be the ending. Also where (on gotfocus) is the best place to put this code so it autopopulates after the FName and LName are entered?

Thanks!

Rick

View 1 Replies View Related

Make A List Of Fields That Aren't Null

Nov 26, 2007

I have a table that has several fields that contain a date if a user is licenced to use a certain piece of equipment and is null if not. Each recor has other data in it such as name, and a unique identifier (numeric). What I want to do is make a list of the fields which have a date in them to create a licence for what they can operate. Any help on which way to go...pretty new at access.

View 14 Replies View Related

Adding Fields In A Make Table Query

Oct 4, 2007

If I have a make table query where I want to add in some blank fields, say: Field1: “” , Field2: “”, etc…. is there a way I can make these fields a yes/no type instead of the default text?

I know I can manually go into the table in design view after I run the query, but I was hoping I could do it beforehand. :)

Thanks!

View 1 Replies View Related

Option Group ==> Make Fields Disappear

Aug 28, 2005

hey, i hav seen a similar thread about this (i think bout a year ago or so) and i didnt no whether to continue it or start a new thread.Option boxes - Making items visible
that thread did not fully answer my question and after searchin around n finding nuthin i hav decided to ask

in my form i have the payment methods=> cash, cheque, credit. i did have these in a drop down menu, but i wasnt sure how to do what i wanted...which is based on the selection either make a couple of fields (credit card details etc) visible or invisible. so what i have done is changed the drop down list into an option group with radio buttons.
i currently have this coding

Code:Private Sub Frame_Click()If Me.Frame.Value = 3 ThenMe.CardHolder_Name.Visible = TrueMe.Credit_Card_Number.Visible = TrueMe.Expiry_Date.Visible = TrueMe.Type.Visible = TrueElseIf Me.Frame.Value = 2 ThenMe.CardHolder_Name.Visible = FalseMe.Credit_Card_Number.Visible = FalseMe.Expiry_Date.Visible = FalseMe.Type.Visible = FalseElseIf Me.Frame.Value = 1 ThenMe.CardHolder_Name.Visible = FalseMe.Credit_Card_Number.Visible = FalseMe.Expiry_Date.Visible = FalseMe.Type.Visible = FalseExit SubEnd IfEnd Sub

this seems to work although say if my first record has credit card selected, then all the fields are visible, but wen i move onto the next record which is cash or cheque...they are still visible until i reselect cash or credit again..(and vice versa)

i hope this makes sense :P
thanks

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved