Modules & VBA :: Database Input Methods

Jun 24, 2013

I need to create a form to input records (or modify records) however im unaware of the methods that could be used to actually put the data into the tables..my current method is using:

Code:
Dim dbs as DAO.Database
Set dbs As CurrentDB
Dim InsertSQL As String
InsertSQL = "INSERT INTO [Table] (Columns) VALUES (Values)"
dbs.Execute InsertSQL

I am not sure if this is the most effecient or best or if it has issues that other methods or ways to use but doing this seems to do the trick.

View Replies


ADVERTISEMENT

Modules & VBA :: ActiveX Control Events Aren't Raised While Calling Its Methods From The Open Event

Oct 9, 2013

We have an ActiveX grid control, 10Tec iGrid, written in VB6. One of its method, Group, used to group rows, raises the AfterAutoGroupRowCreated event so the developer can adjust the look and contents of every group row created during the automatic process of grouping.

When our ActiveX grid is hosted on an MS Access form and we call the Group method while populating the grid in the form's Open event, the AfterAutoGroupRowCreated event isn't triggered. But this event definitely works as expected in other development environments, and even in MS Access if we call Group from the form's Load event.

Is it a well know issue of MS Access, when any events of ActiveX controls aren't triggered while "executing" the Open event

View 1 Replies View Related

Modules & VBA :: How To Input Alarm In Access Database

Jul 23, 2013

how to input alarm in my access database? I have data that should be insert over and over in 4 hours duration, when I put first data, I get local time and I need timer that could count 4 hours and after to make notification (massage) that the time for the Product of the database are over and need to input clean Product.

something like in first-->
ProductTime is column from Access Database
i=j=ProductTime;
for (i=0;i>= j+4hours, i++)
{
If(i=j+4h)
{
msgbox("ALARM- TIME is OVER");
}
}

View 1 Replies View Related

Modules & VBA :: Microsoft Access Database Engine Cannot Find Input Table Or Query

Dec 3, 2013

I have an App that runs a few action queries using:

Code:
CurrentDb.Execute "[My Query Name]"

At some point I get this Error: The Microsoft Access database engine cannot find the input table or query <name>. Make sure it exists and that its name is spelled correctly. (Error 3078).The query is there, I can run it from the DB objects window.Queries run using CurrentDb.Execute earlier in the code.

View 3 Replies View Related

Best Methods- Need Opinion Or Two

Nov 10, 2006

hi,

If I just want to display a relationship between two tables or more with a form and a subform, and I don't want the users to edit/delete/add the data - just view it. What is the best way - queries, bound forms etc? I created a form with a subform, but then ran into problems because I don't want them to be updated, only viewed.


Thank you !!!

View 2 Replies View Related

Parameter Query Using Various Search Methods

May 22, 2006

Hi

I have a table in sql holding telephone data. the starttime column and endtime column are both in "10/05/2006 12:55:56" format.

I want to run a parameter query that lets me search by agent name and then by date. The agent name is no problem but when running parameter query by date it brings back no data. I think this is because the time is also in the same field as the date. Ideally I would like to be able to run the query between certain dates, e.g. find data for agent1 between 2 different dates.

Any help would be more than appreciated!!

Thanks

Ben

View 2 Replies View Related

Combo Box With Multiple (possibly Duplicate) Payment Methods

May 1, 2006

Hello everyone. I'm a little new to the Access scene. I have a strong background in C, C++, Java, and assembly. Seems all the access books out there fail to mention the need to know vbs, heh.

Anyhow, I have a form ([WrkR]) based on a table ([ORDERS]) that has a customer's name ([Tables]![ORDERS]![name]), total payments to visa ([Tables]![ORDERS]![visa]), and total payments to cash ([Tables]![ORDERS]![cash]), and total payments to debit ([Tables]![ORDERS]![debit]). My form also has three rows, each containing a text box which holds how much a person has paid, and a combo box ([combo1], [combo2], [combo3]), that allows the user to choose what payment type was used. I have included a screen cap to demonstrate this.

I need to be able to create a function or macro, anything that will sum up the appropriate totals and store them in the corresponding columns in my table. Like in my example, there are 2 visa costs and a single cash cost that should be added up and stored in my table in the appropriate fields.

View 6 Replies View Related

Structure For Using Input Forms To Main Database

Feb 18, 2005

Note: I put this in General original but it is rmore likely to be a table structure problem

I have a single table for storing the main data, this is fed by input from 3 forms. I have been asked if the forms can be used independantly and remotely as input forms.

My solution was to simply send out a database with just one form and created an append query so that when it is returned with completed information it would simply append the database to the main database. In itself this works fine however, what is happening, of course, is that when I get the other forms back I end up with triplicate records, that is instead of the information from the 3 forms being stored as one record it is now split over 3 records.

I have to be careful in what I do as the original database has been running for over 6 months now and has a lot of stored data and because of established queries/calculations/reports the last thing I want to do is change or split the main data table.

Is there anyway I can get the three records to concantenate on one line. The three forms all have separate fields as they were taken from the original database.

View 7 Replies View Related

Create Input Form For Database With 88 Tables

Apr 30, 2014

I have a database with 88 tables that have 5 fields each. Each field has the same name in every table. The ideal situation would be to have a single table to hold the data currently stored in the 88 tables but each table holds different information. Each of the 88 tables is related to 3 additional tables that hold header information. Needless to say the header info will be identical for each entry of the 88 tables. Access is limited to 256 fields per form so having all fields in a single form has not worked this far. Splitting the forms into groups of tables somewhat works but the header info needs to be inputed every time and it creates duplicate info. Creating a single form with multiple tabs does not work due to the 256 field limitation.

View 14 Replies View Related

User Input To Search Database And Create Report

Sep 9, 2004

I have a database that I created that uses a form to fill out information about server builds. I contains information about who built it, the IP address, server name, etc. I want to be able to create a dailog box that allows the user to input a server name to query the database and create a report based on that input. And if the user input isn't found in the database, a dialog box comes up with some sort of error message. I am still pretty new to Access, so the more detail you can give me the better. Thank a lot.

View 1 Replies View Related

General :: Taking User Input While Opening Database

Dec 7, 2012

In my database there are fields of type Date/Time, their default value is set to now(). But the problem is that those fields are automatically filled up by English system date. I want my own country's date format, without changing my system date format. So I decided, whenever database is opened it should ask for a date, so the user will give today's date and that date will be used automatically on those fields.

View 6 Replies View Related

Forms :: Subform - Input Box Reappears When Closing Database

Nov 13, 2014

I have a

- form called "Hauptformular" and a
- subform called "qry_tracking_Unterformular". Then there is a
- button called "cb_filialname".

Now when opening the Database, the form appears with the subform containing the
- query "qry_tracking"

When hitting the button "cb_filialname" the subform receives the contents of the
- query "qry_tracking_FilName", that has a filtering option on the Column "Filiale": "Like [Filialname?]"

Now the filtering works fine with the following Code:

PHP Code:

Private Sub cb_filialname_Click()Me!qry_Tracking_Unterformular.Form.FilterOn = 
FalseMe!qry_Tracking_Unterformular.Form.RecordSource = "qry_tracking_FilName"End Sub 

-> when you hit the button, the inputbox

Filialname?

appears.

The problem now is, that after having used the button, when I click the "Exit" cross right up there, the inputbox appears again.

View 2 Replies View Related

General :: Allow Colleagues To Input Data To Access Database?

Aug 6, 2013

How do I allow colleagues to input data to the Access database, but at the same time prevent meddling with the database design? Is it possible to password protect some functions but allow others (students/ nurses!) to input data?

View 3 Replies View Related

Queries :: How To Input Race Times As Duration In Access Database

Aug 30, 2014

I am creating an access database for the results of my triathlon times and I am having trouble with the race results. Based on some information I found here, I am using number fields for the swim, bike and run times because I want to do calculations and also sort them and it doesn't sort properly if they are text.I have created separate fields for the hours, minutes and seconds for each of them.

Now I am trying to make a calculated field to convert the numbers to the following..For a swim time, I want to convert it to the time per 100m. I have the calculation for that, but the result gives me the decimal portion and not the actual seconds portion and I am stuck. Here is what I have so far :

Sw100m: (([SwMin]+([SwSec]/60)+[SwHr]/60)*100/750)

So as you can see I have added up all the number to get the total number of minutes and then converted to the minutes per 100m (the race is 750m). And the result gives me 3.31. But the .31 is a decimal and I want to have seconds which is 18 seconds. I know how to do the calculation on paper but I don't know how to change my formula to fix this. On paper I have to multiply .31 x 60. But how do I refer to the decimal portion of the number and modify my formula? how to input race times as duration in an access database.

View 11 Replies View Related

Modules & VBA :: Multiple Value Input Box?

Jun 12, 2014

How I could do a multiple value InputBox in VBA, if this is even possible... This is so I can prompt the end user to enter a range (with two string values as start and end parameters) for a report I'm working on.

If this is possible, I would like to include this as an additional parameter option within the code I have below:

Code:

Private Sub EmployeesBadges_Click()
Dim soa As Byte
Dim emp, sEB As String
soa = MsgBox("Do you wish to print a single employee badge or all?", vbYesNo + vbQuestion)
Select Case soa
Case vbYes

[Code] ....

I'll just create a form to do this.

View 3 Replies View Related

Modules & VBA :: Counting Input In A Subform?

Sep 11, 2013

i have a field in the form where you can choose how many vehicles you have in the contract.

the field is called

amount_vehicle

Then i have a subform where you put the vehicle in.

So there is a 1 to n relation between the form and the subform

The id of the vehicle is called ID vehicle

I want that e.g a user chooses 2 vehicles in the form. Now it is not possible to put in 3 vehicle in the subform.

I�ve created the following code, but it doesnt work.

[CODE]
If DCount("*", "subform", "ID vehicle = " & Me.Parent!ID vehicle) >= Nz(Me.Parent!amount_vehicle, 0) Then
MsgBox "no vehicle"
Cancel = True
Me.Undo
End If]

View 4 Replies View Related

Modules & VBA :: Validate Input In Text Box

Aug 5, 2014

I have a textbox where I need an afterupdate event, which should check that input is 3 letters followed by 3 numbers. The total is 6 characters, but always 3 letters + 3 numbers. If condition not met, a msgbox will be shown, for the user to input correctly, before being able to continue.

View 1 Replies View Related

Modules & VBA :: UPDATE Table From Input Box

Jan 13, 2015

We receive hundreds of items at the time capturing the item barcode and the userID. I want to improve the process capturing the UserID once and updated the table with this entry on all empty records on the table. I have created the following script but I doesn't work.

Private Sub Command7_Click()
Dim strSQL As String
Dim strUser As String

strUser = InputBox("Scan your badge")
strSQL = "UPDATE " & tblGER_ReceivingLog & " SET " & tblGER_ReceivingLog & _
"." & UserID & "='" & strUser & "' WHERE ([" & tblGER_ReceivingLog & "]. & UserID & is null);"
DoCmd.RunSQL strSQL
End Sub

View 3 Replies View Related

Modules & VBA :: Deletion In Table From Input Box

Mar 1, 2015

I'm having trouble executing a SQL command in VB... I want it to find the the value of the input box in TBL-Purchases and Delete all related values. Here's my code.... I get an error on the line I've highlighted in green...

Private Sub Command31_Click()
Dim Message, Title, Default, MyValue1, MyValue2
Title = "Sell Stocks"
Default = ""
MyValue1 = InputBox("Which stock ticker name would you like to sell?")
MyValue1 = UCase(MyValue1)

[Code] .....

View 9 Replies View Related

Modules & VBA :: Input From Form Into Code?

Jan 20, 2014

i have being requested to create a from that displays the number of files in different folders. I can accomplish this somewhat with the code below. In the example below it is only showing the code for the first 3 folders. I have 7 folders in total to count.

1.Each week the location of the data will change. In the example below it is showing 2014-W03, the following week it will be 2014-W04 etc. etc. I was thinking of having an input box in the form that the user type the date into, to trigger the code, but how would I go about changing the code to include this variable?

2.I need to repeat this code for 9 other products, so my form will be displaying data for 10 products in total. I know I could copy this code 9 times and modify it accordingly, but is it possible to loop it in some way?

Code:
' Returns the total number of fails
Private Sub Form_Load()
Dim file As Object
Dim fileCount As Long
With CreateObject("Scripting.FileSystemObject").getfolder(" estmachineProduct1 FAILS2014-W03")
For Each file In .Files

[code].....

View 11 Replies View Related

Forms :: DMax Criteria - Creating A Form To Input New Return Parts Into Database

May 22, 2013

I am currently creating a form to input new return parts into a database. I am trying to automatically generate a tracking number (##-AA-####-####). I have gotten myself to generate the ##-AA-#### in a list box and almost was able to generate the sequence number, 0001, 0002, etc. using the dmax function. I would like to generate the sequence number one higher than the highest, depending on part type and last 4 digits of part number. Our parts have unique last 4 different p/n but more than one can fall under the same type.

View 14 Replies View Related

Modules & VBA :: Need To Update Field Values Via Input Box

Aug 18, 2015

I'm trying to update the account number via an input box with a do loop but I don't have the code right. The at the input box, the user will type in a 4-8 digit number and it will update all the account number fields in a table that are null.

View 1 Replies View Related

Modules & VBA :: Validating Input In Combobox Of Form

Jan 24, 2015

I try to validate the input in a form combobox. In my table it works okay with a validation rule

validation rule: Like "[A][B]"
validation text: The input should be two numbers with A or B with two numbers Example: 01A01 or 21B43

But when i go to my form i can still input other letters than A or B. It will not save but there is no warning that the input is wrong.

View 4 Replies View Related

Modules & VBA :: User Input Criteria For Union Query?

Aug 20, 2013

I am trying to get my VBA code to dump a query once the user pushes a button. I have the following code to call up the Excel app.

Code:

Option Compare Database
Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long

[code]....

The qry_PP_Errors_Union is a Union query. In this query there is a date field. I would like to be able to to use that date field as a parameter. So I have written this VBA to prompt the user for a Begin Date and an End Date.

Code:
Beep
strBegindatemsg = "Enter the beginning date." & vbCrLf & vbLf
strBegindate = InputBox(Prompt:=strBegindatemsg, Title:="Begin Date")
Beep
strEnddatemsg = "Enter the beginning date." & vbCrLf & vbLf
strEnddate = InputBox(Prompt:=strEnddatemsg, Title:="End Date")

Now the part that I am missing is that I am not sure how to make the "strBegindate" and "strEnddate" the criteria for the union query.

The following is the SQL for my union query.

Code:
SELECT LastName, FirstName, Title, TeamName, WorkOrderNumber, DateCompleted, WorkCode, UICError AS Error, "Update and Internal Correspondence" AS Category FROM qry_PP_UIC_Error
UNION
SELECT LastName, FirstName, Title, TeamName, WorkOrderNumber, DateCompleted, WorkCode, BIDError, "Bids" FROM qry_PP_Bid_Error

[Code] ....

Without the criteria, my code works for dumping everything out into Excel. However, dumping all the data results in a 7 mb Excel file that requires manual deletion of the information that is not pertinent.

View 3 Replies View Related

Modules & VBA :: Save Input Into Array And Show This Information

Nov 23, 2013

I want to save input into an Array, and then show this information.To enter data I am using a textBox. After "Enter" it should save info into the Array.If textBox is empty, it should show information. I would like to use a textbox too, that shows all the Array after pressing Enter.

textbox on the Form: txtInput, txtOutput..I have the following code, but I am not able to get it work:

Code:

Option Compare Database
Public Sub Form_Load()
Dim Data(10) As Integer
Dim i As Integer
Dim j As Integer

[code]...

View 4 Replies View Related

Modules & VBA :: SQL Query Field Based On A String From Input Box

Sep 10, 2013

How do I use a update sql query to update a field based on a string from an input box. Heres what i have been trying:

Code:

Dim NETWORKBOX As String
NETWORKBOX = InputBox("NETWORK TO IMPORT" & Chr(10) & "EXAMPLE: PRIMARY", "NETOWRK TYPE")
sql = "UPDATE " & TABLENAME & " SET NETWORK = " & NETWORKBOX & " ;"
DoCmd.RunSQL sql

If i run the code and input 'PRIMARY' in the NETWORKBOX the sql query will return an 'enter parameter value dialog box' with the word 'PRIMARY' above the input field.

View 1 Replies View Related







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