473,574 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft Access / VBA Forum

Microsoft Office Access database and VBA - Ask questions about microsoft access queries, reports, forms, macros, modules, security, automation, functions, records, mining, visual basic for applications and more.
2
75,015
thread by: DaveN | last post Feb 17 '06 by: Anthony England
Hi all, I'm trying to update a record in a table with data from text boxes on a form. As a background to this, I managed to add a new record to the table in a similar manner with the following: Set db = CurrentDb Set rs = db.OpenRecordset("Project Table") rs.AddNew rs("Project_Number") = Me!
3
75,936
zmbd
thread by: zmbd | last post Apr 20 '16 by: zmbd
It seems that in VBA some the most fundamentally basic commands for file control are the hardest to find any information for, for example, the basic File operation commands, such as DIR(), CHDRIVE(), CHDIR(), FILECOPY(), NAME(), KILL(), and commands to handle the basic text input/output. So in this article I want to cover the basics behind the...
9
76,031
ADezii
thread by: ADezii | last post Apr 3 '19 by: respinosa
There are basically 4 Methods that you can use to access the values of Fields in Recordsets. For the purposes of this demonstration, I'll be using a Table called tblEmployees, a Field named , and a DAO Recordset although these Methods are equally applicable to ADO Recordsets. The following code will print all the Last Name () values in the...
5
76,360
thread by: Karl Irvin | last post Oct 19 '06 by: CDMAPoster
In VBA, how do you see the results of an sql count statement like the following ? Select Count (*) as Total from tblCustomer Result = DoCmd.RunSql("Select Count (*) as Total from tblCustomer") gives an error I need to get the count into a variable.
3
76,474
thread by: Ntl News Group | last post Nov 14 '06 by: Kc-Mass
I have a text box that contains the number 1234, I want the value form the text box to display in a second text box so I used: = The problems is that this displays 1234 and I want it to display 1,234 using a comma for the thousands and no decimal places. I changed the format on the second text box to: =Format(,”Standard”)
7
77,729
thread by: ljungers | last post Dec 30 '06 by: NeoPa
Have a need to reference a value in 1 or 2 text box(s) on a prior form. Based on the value(s) entered, I may need to clear out 1 or 2 value(s) that where entered but not required in a couple of text boxes on the prior form. Not sure how to reference those text boxes in the dot notation used in VBA. I tried to use the Me.Refresh but that is not...
11
78,866
thread by: tara99 | last post Dec 20 '06 by: MMcCarthy
Can some one tell me the correct syntax of Update statment for updating multiple fields. I want to update few item in record (few fields i a table). Thanks
7
79,736
ADezii
thread by: ADezii | last post Jun 14 '16 by: Moussiel
Use the FindRecord Method of the DoCmd Object (least efficient) - The simplest approach for finding a specific Record is to create an Event Procedure for the Combo Box that mirrors each step of the generic Find process. Private Sub cboFind_AfterUpdate() Application.Echo False Me!.SetFocus DoCmd.FindRecord cboFind ...
0
80,571
NeoPa
thread by: NeoPa | last post Dec 10 '06 by: NeoPa
Background Whenever code is used there must be a way to differentiate the actual code (which should be interpreted directly) with literal strings which should be interpreted as data. Numbers don't usually have this problem but Dates can too. Debug.Print Me.ControlName refers to a control on a form. Whereas, Debug.Print "Me.ControlName"...
11
80,640
NeoPa
thread by: NeoPa | last post Mar 20 '15 by: Jerry Norbury
Overview It is often required to prompt the operator of an Access project to select a file or folder. Sure, it's possible to allow them to type it in freehand, or even paste it in from another application, but generally operators are more comfortable with the facility to select it from the existing file structure as they would in most Windows...
1
81,508
thread by: zwasdl | last post Sep 14 '06 by: victorcamp
I'm using Access 2003 thanks
23
81,989
thread by: Brian | last post Nov 12 '05 by: david epsom dot com dot au
Hello All - I am wondering if anyone has any thoughts on which is better from a performance perspective: a nested Select statement or an Inner Join. For example, I could do either of the following: SELECT supplier_name FROM supplier
4
83,543
thread by: galsaba | last post Nov 13 '05 by: Ken Snell
I created a form with the following fields: ID (AutoNumber) Date (Date / Time) Name (Text) I want to create a query that will take the first letter of the Name & Date & ID & last digit of the ID. Thanks,
19
83,693
thread by: sphinney | last post Aug 13 '12 by: zmbd
My company is in the process of upgrading everyone to Access 2007. Since my machine was upgraded I've been highly frustrated with an apparent random behaviour byAccess that I can't understand. It involves databases that I created in Access 2002 (i.e. *.mdb files). What happens is when I open a form that has the border style property set to...
7
85,601
thread by: William Case | last post Nov 12 '05 by: David W. Fenton
Hi folks, Screen.PreviousControl.SetFocus works fine to select the control that had focus prior to the one that NOW has focus. Unfortunately, I've not discovered a VBA code way to get the name of the control, that currently has focus. It would be nice if the Screen object had a property called "CurrentControl" that could be stored in a...
2
85,822
thread by: shah | last post Aug 29 '06 by: MMcCarthy
Can someone help me please. I have data from another system passed into an Access db that we use to run queries. One of the fields gets passed codes: G, S, Q. I wanted to know how to have them displayed as GGG, SSS, QQQ for userfriendliness. There is other complex stuff going on where i need to do this through the visual basic editor in access. It...
17
86,518
thread by: JKoyis | last post Nov 3 '11 by: mshmyob
I'm trying to put a link on a database form, but access keeps throwing a warning message when I click it: "A potential security concern has been identified, this location may be unsafe." The help mentions unchecking an option in the trust center, but the option isn't listed for me. The link points at a directory in a subfolder of the...
3
88,257
thread by: robin27th | last post Aug 17 '10 by: NeoPa
Hi, I am very new to access. I am asking something basic. Private Sub Command12_Click() Dim strAbc As String strAbc = "a" MsgBox IsNull(strAbc) MsgBox IsEmpty(strAbc) End Sub
6
91,624
thread by: C L Humphreys | last post Nov 12 '05 by: hal boyles
Hi, I'm trying to concatenate address fields and insert a LF&CR after each line. The SQL I use is based on select address1 & chr(10) & chr(13)& address2 & chr(10) & chr(13)& address3 & chr(10) & chr(13)& address4 & chr(10) & chr(13)&
2
92,168
overcomer
thread by: overcomer | last post Nov 19 '08 by: overcomer
Hi.... Please advise on how to create dynamic left padding for string... thanks to you.. Also, if anyone could add any idea of cascading combo box as it's not possible to setup rowsource in vba. syntax for access 2003 can be ... thanks so much
6
94,533
thread by: Max | last post Nov 12 '05 by: James
Hi, I have SqlServer 2000 as back end and Access 2000 as front-end. All tables from Sqlserver are linked to Access 2000. I am having write conflict problem with one of my form which is bound to a query which consist of let say tableA , TableB and TableC (all are linked tables from SqlServer. While the form is open I am modifying TableA...
32
95,945
thread by: bloukopkoggelmander | last post Oct 23 '21 by: NeoPa
Hi All A simple query I suppose for most fo you. Here goes: I have a form for data antry. Once the user has completed and saved the first entry and want to create a new one, I would want them to click on a button that says " New Entry" or something, which then clears all populated form controls ready for a new antry. I have found some...
6
96,001
NeoPa
thread by: NeoPa | last post Mar 19 '12 by: twinnyfo
Introduction The first thing to understand about Sub-Forms is that, to add a form onto another form takes a special Subform control. This Subform control acts as a container for the form that you want to act as a Sub-Form of the main one. That is to say, if you wanted frmB to act as a Sub-Form of frmA, then you would create a Subform control...
16
97,544
thread by: ykhamitkar | last post Feb 4 '19 by: Hoopla3000
Hi there, Is there any way I can change mouse cursor in ms access form using code. If i get get some code which will change mouse cursor with some text that will be great. Thanks, Yogesh
3
101,541
thread by: hannoudw | last post Jul 28 '16 by: Nkosi
Hi i searched here but i didn't find out how to add a button and when i click on this button to open a new blank record? I could really need some help. many thanks :)

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.