Modules & VBA :: Adding Extra Validation In Sample Database

Aug 20, 2015

I am trying to add extra validation in a sample db (done in A97 (converted to A2003)see attached.

I am attempting the following: Please not that the db has existing validation which I would like to keep (or change if advised) ...

Conditions:
1. Input into field "ID" must start with the letter P or p or R or r
2. If field "ID" starts with the letter P or p and field "Code" starts with the letter R or r, then a message stating that this combination is invalid should appear
3. If field "ID" starts with the letter R or r and field "Code" starts with the letter P or p, then a message stating that this combination is invalid should appear.

View Replies


ADVERTISEMENT

Modules & VBA :: How To Adjust A Sample Database To Suit Specific Needs

Oct 29, 2014

I would like to make some changes to the Northwind sample database.I need to have the Customers section completely removed as my company issues products to our own staff, not to external customers, so there is no Customers and shipping details needed.

View 2 Replies View Related

Adding Extra Columns Dynamically

Mar 5, 2007

Hi

I have 120 tables, each with the same name except 2 identifying characters at the end eg pc_dist_ab, pc_dist_al
Each table currentnly has 3 columns.
I would like to be able to add 2 additonal columns to each table with one query and was hoping an alter table query where the table name matches pattern would have worked but evidently not.

Is there a way to build some sort of dynamic query to add extra columns to these different tables at the same time?

To save another post I guess Once this is done I would then like to create 1 main table by creating a new table and appending all the files together- again I would prefer to be able to run this once.

I'd appreciate any help/thoughts as to whether this can be done?:confused:
Thanks

View 1 Replies View Related

Forms :: Asking For Sub-datasheet After Adding Extra Relationship

Jun 20, 2013

I have 2 relationships between 3 tables,

Customer Table > Customer ID (pk) 1
Issues Table > Customer ID (FK) Many
Complaints Table > Customer ID (FK) Many

Each table has Customer ID as you can see, I have linked the Customer ID From Issues & Complaints table to the Customer ID field to the Customer Table using a 1 to Many relationship.

Am creating a form on the customers table so an admin can add a customer issue against the customer this is working fine, The trouble is when I link the Complaints table as well. its asking for subdatasheets.

View 1 Replies View Related

Sample Database

Oct 26, 2006

Hi,

Does anyone know where I can get a sample database that shows me a order form that rmoves items from stock as they are being brought?


Kind Regards


David

View 2 Replies View Related

Sample Attendance Database?

Sep 7, 2006

I am trying to create an attendance application for my group of 6people, does anyone have or know where i can find any to look at. I don't even know where to begin.

Daily in and out. Keeping tabs of our vacation days/sick days.
I just need to know where to begin, or need a sample for ideas in creating this. I have looked high and low. Please show me/tell me if you have any or how you did it, if you have done it before. Thanks friends!

I posted this here but didn't get any response.
http://access-programmers.co.uk/forums/showthread.php?t=114099

View 6 Replies View Related

DateDiff Function Sample Database

Aug 29, 2005

Hey, its been a while since I've posted here, wow.

I had a database that contained samples on different date functions

(first of the month, last of the month, first weekday, etc...)

I can not find it, I have tried searching. I am pretty sure I got it from here.

Does anyone know where this is?

View 3 Replies View Related

Need Sample Database For Stock Transactions

Jan 28, 2008

Hi,

I'm in over my head with something I've been asked to do at work as my access skills are pretty basic.

I need a sample database containing PRODUCTS and SUPPLIERS, that lets you book IN stock received from the supplier (and adds to the stock level) and lets you book OUT stock issued to staff (and reduces the stock level)

I'll have a go at reorder levels, form design, stuff like that myself, but I'm having trouble with these very basic requirements.

Does anyone know of a sample database that I can download to learn some of this from?

View 2 Replies View Related

Request: Database Sample With Working ListView

Jun 27, 2005

Hello all,

I finally got TreeView to work, by downloading the example database from this (http://www.access-programmers.co.uk/forums/showthread.php?t=80805&highlight=treeview) thread. I haven't had as much luck with ListView, though. Does anyone have a database they could post that has a working listview? I'd greatly appreciate it!!

Thanks,
Eric

View 1 Replies View Related

Coffee Shop Or Resturant Sample Database

Nov 24, 2005

hi ,
does anybody have coffee shop or resturant sample database ?!

for example something that gives menu's and then u select people orders and then calculate the prices and print a bill

thanks

View 1 Replies View Related

Recordset Clone Error In Sample Database?

Mar 4, 2008

Hi Everyone,
I was wondering if anybody would be kind enough to help me with a problem that I have with regards to a 'Contacts Database' that I found under the Sample Database link on this site - posted by MStCyr. When I try to navigate through A-Z buttons I am presented with a dialogue box which states " the object doesn't contain the Automation object 'RecordsetClone', whatever that means??

I would like to use this sample DB in my project however it is presently unusable unless I can figure out how to clear this problem. If this is not achievable could you please point me in the right direction where I could find a similar, downloadable file.

Hopefully a more experienced forum member than I could please help me out.........

Best Regards

CarolW

View 8 Replies View Related

3 Tier Combo - Based On A Sample Database

Aug 18, 2005

Hello!

I'm still working on this supplier database for my boss and the supplier filter section is still causing me problems.

Let me set the scene for you....

I have a form with 3 combo boxes on it. These are cboProg, cboPPS & cboSupplier.

I need to get the combo's working so that when you select a programme from cboProg it filters the list in cboPPS (Primary Product or Service) to show only products and/or services that are used on that programme. In turn I need to make it so that when you select one of these Primary Product or Service's from cboPPS it filters the list of suppliers in cboSupplier to show only suppliers that provide that product or service.

Essentially, I have a HUGE list of suppliers that I want to filter down to suppliers that work on a programme providing a particular product or service using the combo boxes in the order shown below.

Programme (cboProg) --(filters)--> Primary Product or Service (cboPPS) --(filters)--> Supplier (cboSupplier)

When I have filtered the list of suppliers down to a list that worked on programme X, providing product or service Y, I'd like to make it so that you can just double click on that suppliers name to open their details.

I've based my previous efforts on a sample database called dbcombos that I found on this forum (I've attached it to this post). The only problem with this database is that it’s 2 sets of 2 tiered combo boxes on the same form and not a 4 tiered set of combo boxes as I originally thought.

Any ideas? All help greatly appreciated!

View 1 Replies View Related

Problem With MouseTrap Sample After Securing Database

Oct 14, 2005

ghudson:

I am experiencing a problem with the mousetrap sample after I secured my database.

When I save on my main form and I try to go to my subform I keep getting the "Please Save this Record! You can not advance to another record until you either 'Save' the changes made to this record or 'Undo' your changed."

I have saved but it is still preventing me from going to the my subform. I numbered the Save Required msgs so that I know which one I am getting and I am getting the one from:

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo Err_Form_BeforeUpdate

Me.tbHidden.SetFocus

If Me.tbProperSave.Value = "No" Then
Beep
MsgBox "Please Save This Record!" & vbCrLf & vbLf & "You can not advance to another record until you either 'Save' the changes made to this record or 'Undo' your changes.7", vbExclamation, "Save Required"
DoCmd.CancelEvent
Exit Sub
End If

Exit_Form_BeforeUpdate:
Exit Sub

Err_Form_BeforeUpdate:
If Err = 3020 Then 'Update or CancelUpdate without AddNew or Edit
Exit Sub
Else
MsgBox Err.Number, Err.Description
Resume Exit_Form_BeforeUpdate
End If

End Sub


Above it is checking if tbProperSave.Value = "No" and in bSave you have
Case vbYes: 'Save the changes
Me.tbProperSave.Value = "Yes"
DoCmd.RunCommand acCmdSaveRecord
Me.tbProperSave.Value = "No"

So it's setting the value to no again?

I know it's not a permissions thing because I am admin and have full permissions on the forms.

Any suggestions?

View 7 Replies View Related

Modules & VBA :: Adding Table To Back End Of Database

Feb 27, 2015

Can I create a table in the back end of my database using VBA in the front end? My client is using this system and I can't easily go to their location. I need to create a table on the back end and have it available in the front end applications. My thought is to create a front end only for the purpose of updating the backend with this new table. My idea is now to have it open with a button for the user to click - this will add the table to the backend with the required fields, confirm the update was completed and then close. This app then would be trashed so it would not be run again. (Though I would put a check in the VBA that if the table existed, the user would get a message box and the coding stopped to avoid overwriting the existing file.)

And once the table is created, is there a way to programmatically link it to the front end. I will be providing a new front end with this update so I could add something in the new version.

View 10 Replies View Related

Modules & VBA :: Appending / Adding Certain Records To Another Database

Feb 17, 2015

The goal I am trying to accomplish using VBA within Access 2010 is to append/add certain records to another database (Customer Service) from my database (Client Request). I tried using a macro to append then update records in my database but there is a "lag" time as to when the information is updated in the 'Customer Service' database causing my updates not to occur.

Here is the SQL from my query:

INSERT INTO Issues ( Customer, Title, [Due Date], [Opened By], [Opened Date], Priority, Comments, [Job Number], Description )
SELECT [TBL003_Combined Data].CUSTOMER, [TBL003_Combined Data].TITLE, [TBL003_Combined Data].[DUE DATE], [TBL003_Combined Data].[OPENED BY], [TBL003_Combined Data].[OPENED DATE], [TBL003_Combined Data].PRIORITY,

[Code] ....

And here is how I "thought" I could fix it through Access VBA:

Function UpdateIssuesDatabase()
Dim con As Object
Set con = CreateObject("ADODB.Connection")
On Error GoTo UpdateIssuesDatabase_OpenError
con.Open _

[Code] .....

I have highlighted where it is giving me the issue.

View 9 Replies View Related

Modules & VBA :: Adding Trim To All Textboxes In Database

Aug 6, 2014

I need to add trim to all text boxes in my database. Any easier way than to add it to the afterupdate event of every text box or a complete list of all trims on buttons that save the records?

View 14 Replies View Related

Modules & VBA :: Adding Queries To Groups In Particular Database

Dec 29, 2014

I have a number of groups in a particular database. These are based on the month that they relate to, but they are also split into four separate groups for each month. So for example, I will have four groups for November 2014:

November 2014 Raw Data (which contains linked tables in another database)
November 2014 (which contains the bulk of the queries that are used for processing)
November 2014 Reporting (which are the queries that are used for month end reporting - obviously)
November 2014 Misc (anything that doesn't fit into the above, although there are always queries in these groups)

Now, I have been using this database since 2012, so as you can imagine there are quite a significant number of groups. Adding queries to new groups for each new month is therefore starting to take a while by scrolling down to the bottom... Is there a way to do this by using VBA? It would save a bit of time each month.

View 6 Replies View Related

Modules & VBA :: Getting Extra Characters In Column

Aug 16, 2014

Copying a column from one record to another. Code is:

Code:
Set fld = Records.Fields("violationLocalOrdinanceNumber")
If Len(fld & "") > 0 Then
rst!LOR_NB = Nz(Records!violationLocalOrdinanceNumber, "")
Debug.Print ("LOR NB:" & rst!LOR_NB & "." & " len:" & Len(Nz(Records!violationLocalOrdinanceNumber, "")) & " len new:" & Len(rst!LOR_NB))
End If

Some of the output I'm getting is:

LOR NB:8.08(5) . len:7 len new:25
LOR NB:7.08(5)(a) . len:10 len new:25
LOR NB:7.08(5)(a) . len:10 len new:25
LOR NB:7.08(5)(A) . len:10 len new:25
LOR NB:7.08(5)(A) . len:10 len new:25
LOR NB:7.08(5)(a) . len:10 len new:25
LOR NB:8.08(5) . len:7 len new:25

No matter what the original string length is, something is adding extra spaces and forcing it to 25 in the new record. This is the only field I've been able to identify with this issue. Column definition is char(25), no indexes or anything special that I can tell.

Tried adding a left() function call after the assignment but that didn't work either.

View 4 Replies View Related

Modules & VBA :: Adding Data From List Box To Database One At A Time

Sep 12, 2013

how do you loop through and insert selected data from a listbox on at a time?For example, lets say you have an insert statement that has a firstname, lastname, CarsID(foreign key) and address field. Lets say you had another table that has ID and CarsID(primary key) field. In the listbox, you have populated it with all the cars and they are selected.

Example:

INSERT INTO PEOPLE(firstname, lastname, CarsID) VALUES('John','Smith','Honda')
INSERT INTO PEOPLE(firstname, lastname, CarsID) VALUES('John','Smith','FORD')

View 2 Replies View Related

I Want A Form Like In Northwind Sample Database: Summary Of Sales By Year Report.

Jan 9, 2006

Hi,
I have a problem with form design,
I want a form like in Northwind sample database: Summary of Sales by Year Report.
It use Sorting and Grouping for Footer that I can't find it in Form design.
Is it any other way to do it in Form design so I can get the same result like in Report design?.
The reason why I want it, because I want to control the size.
thankyou in advance for your help.

Gunawan.

View 2 Replies View Related

Modules & VBA :: Adding Button With Special Functionality - File Location In Database Path

May 28, 2014

In the access form I want to add a button with a special functionality.

After clicking "Select file" button special window should be open (or something else). It should give user a possibility of files locating (doc, pdf, rtf, txt ...).

After selecting the file and confirm the choice in the table "File_location" in database path to the file should be saved .

View 4 Replies View Related

Need Help Adding A Validation Rule???

Jul 26, 2006

I am working on something and it asks to "add a validation rule" to ensure the donation date is in 2006 (after 1-Jan-06). Ummm...I'm confused!

View 1 Replies View Related

General :: Database Redundancy And Validation

Aug 16, 2013

I've inherited a database with multiple users, massive redundancies, and strict policy limitations:

1. The existing table structures must remain, despite redundancies that create problems constantly, because of multiple client programs.
2. Data entry must not be programmatic: no data can be generated by code.

I can, however,
A. Create new, interdependent tables, or
B. Validate data with criteria or VBA.

I have two rules I'd like to enforce:

Rule 1: This one is easy. Certain redundant Locations must be identical. So, all the Locations in Table A must appear in Table B as well (although B may contain Locations not in A). No Big Deal.

Rule 2: An absolute rule for every Location is that each must occur between the boundaries established for that particular Track and Section.

So, given that I have a Table with Records of Track, Section, StartLocation, EndLocation (which defines the limits for Location values)...
Track 1, Section 1: Starts at Location -100, Ends at Location 100
Track 1, Section 2: Starts at Location 50, Ends at Location 20
Track 2, Section 3: Starts at Location 0, Ends at Location 400

I want to prevent users from entering illegal locations in another Table with Track, Section, Location, like:Track 1, Section 1, Location 101 (this location is beyond the end of Track 1 Section 1)I could code this in VBA, but the downside is it won't be enforced if the user has Macros turned off by default.

View 7 Replies View Related

Modules & VBA :: Add Validation For Not Zero

Jul 24, 2014

I have the following that I found in a post on Keypress of a text field to limit the field to only numbers. This works great only I need to disallow the entry of zero.

If KeyAscii <> 8 Then ' Not Backspace (important for error correction)
If KeyAscii < 48 Or KeyAscii > 57 Then 'Not a number
Beep 'Let the user know they hit an illegal key
KeyAscii = 0 'Don't let the keystroke through
End If
End If

View 14 Replies View Related

Help Needed With Database Problems; Validation Rule And Image In Form

Apr 17, 2007

Hello Everyone,
I am in the final stages of creating a database for school coursework however I am having a few problems with a few features; any help would be much appreciated.
The database itself is meant to manage / keep are record of utility bills, it consists of two tables: Invoice and Company.

Problem 1.
In the Invoice table there are two fields called Date Due and Date Received the data type is Date/Time, how do I create a validation rule so that Date Due must be after 'Date Received' and vies versa?

Problem 2
I want each record in the database to store an image of a scanned invoice, and the main form called Transaction to show a preview image of the invoice. Much of the code I used is borrowed from the Access Northwind sample database, after some initial success I had to redesign the 'Transaction' form where the picture was shown and now I get the error message:
‘Run-time error 2135, this property is read-only and cannot be set’
I think I know what is causing the error but I have had no luck fixing it, if someone could help me that would be excellent.

Problem 3
Once I get the Transaction form to properly store and display a preview image of an invoice, I want to add a button that opens the image in an external window(ie MSPaint).
Currently my only success has been to add a button on the form that launches MSPaint (you have to manually open the image in MSPaint.)
Again, if someone could help me sort this out it would be excellent.

Sorry if my problems aren’t clear or well explained.

I have spent many hours looking for answers to my problems in forums, Access help files etc…
My computing tutor has little (no) experience with Access so he has been unable to help, hopefully the people on this forum have the expertise.

I am happy to email you my database if you need it to help me with problems 2&3.

Thanks in ALOT advance :)
-Sarge

View 2 Replies View Related

Help Needed With Database Problems; Validation Rule And Image Form

Apr 17, 2007

Hello Everyone,
I am in the final stages of creating a database for school coursework however I am having a few problems with a few features; any help would be much appreciated.
The database itself is meant to manage / keep are record of utility bills, it consists of two tables: Invoice and Company.

Problem 1.
In the Invoice table there are two fields called Date Due and Date Received the data type is Date/Time, how do I create a validation rule so that Date Due must be after 'Date Received' and vies versa?

Problem 2
I want each record in the database to store an image of a scanned invoice, and the main form called Transaction to show a preview image of the invoice. Much of the code I used is borrowed from the Access Northwind sample database, after some initial success I had to redesign the 'Transaction' form where the picture was shown and now I get the error message:
‘Run-time error 2135, this property is read-only and cannot be set’
I think I know what is causing the error but I have had no luck fixing it, if someone could help me that would be excellent.

Problem 3
Once I get the Transaction form to properly store and display a preview image of an invoice, I want to add a button that opens the image in an external window(ie MSPaint).
Currently my only success has been to add a button on the form that launches MSPaint (you have to manually open the image in MSPaint.)
Again, if someone could help me sort this out it would be excellent.

Sorry if my problems aren’t clear or well explained.

I have spent many hours looking for answers to my problems in forums, Access help files etc…
My computing tutor has little (no) experience with Access so he has been unable to help, hopefully the people on this forum have the expertise.

I am happy to email you my database if you need it to help me with problems 2&3.

Thanks in ALOT advance
-Sarge

View 1 Replies View Related







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