I have some code to delete a record from a table, which does not delete the record, presumably because of referential integrity settings. That is fine of course, that's what should happen. However I want to be able to notify the user if a delete did not succeed. How can I check this? I tried this code, but it did not return an error.
Code:
strsql = "DELETE * FROM " & tblAddress & " WHERE GenAddressID = " & Me.tb_edtID
Err.Clear
CurrentDb.Execute (strsql)
If Err.Number <> 0 Then
MsgBox (Err.Description)
End If
my issue is i have multilble text box in my form & based on change in one of this text box i need the code to compare between data in the form & table & returm Msg if it is not matching. attached screen FYI.
i look in the internet but i could not figuer out the VBA code since i do not know VBA. what comes to my mind to to use select case.
Hi, What looks simple is not turning out that way! In our organisation a country may have one or more (often just two) provinces. Some provinces have one or more countries (as many as four). As an example, Philippines South province may have that part of the philippines to look after and Pakistan as well. The country (philippines) has two provinces, one north one south. The south has part of the philippines to look after plus pakistan. Clearly, then, a many-to-many relationship? In due course I want to be able to pull out information relating to the country (e.g. Philippines) from either the north or the south province....the country info will be the same, but the province info will be different. But I keep getting a one-to-one resulting from the following tables, which was the way I thought I'd need to create the many-to-many relationship. I'm beginning to think it mightn't be M:M after all!
COUNTRY countryID (text type, since no names repeat)
PROVINCE ProvinceID (text type since we use a 3 letter code eg FIN stands for Philippines North FIS for Philippines South)
COUNTRYPROV (link table) ProvinceID CountryID I assumed that to relate the first two successfully, I create a link table by taking the two primary keys above and putting them into a third table, right?
But for some inexplicable reason, I can't then get PK countryID to relate to FKcountry ID one-to-many. It comes up as one-to-one. Similar when I drag PKprovince to FK province in the link table. I'm obviously missing something very simple but what is it? Julian
I have created my own login forms using VBA Language, however I now want a query (Query A) to automatically run, to update data from a linked table (Table A) to a table that is editable (Table B).
This is a real mind bender. I am running a2k. I am merging two databases. table1 is in the backend database. table2 is linked to the second database. I run an append query to add table2 entries to table1. The append fails for 96 recs saying key violation. Turns out I can rerun the append if I drop the zip code field. I then try to manually change the zip code and receive the duplicate values in index, primary key, or relationship.
I ran a compact & repair the databases, still no go. I can't edit the value of the zip code. I import the table to a new database. Still can't change the zip code. I drop MANY of the indexes. Even the index on the zip code field. Run compact&repair. still getting the index message. I even re-imported to a new db again. Still same error message.
I may start again by importing JUST these two tables to a new blank db and see if I get the same issues. I'll keep you posted...but maybe there is someone out there who has seen this error before.
fyi-if I enter a new record, the autonumber field correctly increments to the next available autonumber field. (I say this because of another thread on this matter w/ autonumber fields and bug in A2003)
I receive a report daily. From this report I need to calculate the number of successful backups within a window, and number of successful backups outside a window. The window is 7:00 a.m. The column contains date and time (10/15/2014 7:00 AM). Right now I have written the following query =Date() And > #7:00:00 AM#
I do not get any results even though there are 79 records that fit the criteria.
I've been asked to make a 5 questions test to evaluation potential new employees' knowledge of MS-Access. Honestly, I need your input on what to ask. The goal is not to make a very hard test, but rather to see if somebody as at least basic knowledge of SQL and Ms-Access.
Some background information of what we do with MS-Access We use MS-Access as a central hub for different download from different systems. We make a lot of daily imports. We export queries in Ms-Excel. We open it from Access and format the report. We make hundreds of reports every day. We don't really use forms or reports.
What questions to ask? I was thinking of having 2 questions about SQL. One simple query with a formula, and a query with 2 tables (perhaps a left join). On what should my other questions be?
Hey all, I'm trying to design a Test / Survey database.
I have posted regarding this problem before if it looks familiar to you.
Please look at the .jpg attached
I have looked at some previous survey/tests design posted on this forum and had a good table design based off of a Pat Hartman suggestion. Now i am wanting more out of the database and need more advanced options. The main problem is how to tell which answer/OptionDetail is the correct answer for both Surveys and Tests. Maybe it would be better to separate the two? All suggestions welcomed.
Case Survey Here is what i am trying to do. When a user decides to make a new question for a survey they will have to choose what type of question the question will be. For example say the user wants to make a survey with a answer grid question. They would choose Answer Grid from the tquestionstypeMaster combobox. Then they would have the option of choosing a type of answer grid (Satisfy3) from the tQuestionTypeOptionsMaster combo box. Say the user chose Satisfy3 then they would be presented with a list of all possible answers that the test taker would see for the Satisfy3 choice ( Very Satisfied, Somewhat Satisfied, Not Satisfied).
This is what i want as far as the survey section goes.
Case Test A user decides to make a new question for a test they will have to choose what type of question the question will be. For example say the user wants to make a test with a Multiple Choice question. They would choose Multiple Choice from the tquestionstypeMaster combobox. Then they would have the option of choosing a type of answer grid (Single Answer, Multiple Answer) from the tQuestionTypeOptionsMaster combo box. Now comes the part where im stuck. I have to somehow get the Multiple choice selections that the test maker is entering into the tAnswers table and figure out how to tell the program to look at tAnswers insted of tQuestionTypeOptionsMasterDetails when the test taker opens up the form. I also need to figure out how to tell which multiple choice selection is the correct answer.
If i hold a record in a table with the path and file name held in one field, is it possible to code Access 2000 to check that this file exists? I want the database to perform a certain action should it not be found.
I have offered to help a local school ICT Dept with their A level projects. the first database they send me and I can't get further than the sub menus. I would appreciate any assistance as I don't know wether it is something I am doing wrong or something within the structure. I've opened it using the Shift key to look at the code and can't see anything wrong. Any help will be very much appreciated. Regards. Bernard
Hey all, So I'm pretty much done with this database project, but I've got a few minor snags... 3 actually.
1) get error when use delete button and select any option other than "yes" 2) my listbox selection does not load the record in the main subform area as it is supposed to (but I think I just don't know how to set this one up) 3) the frmAdd does not allow user to enter values into the fields for some reason, don't know what's up with that one
If anyone could take a peak, check it out, let me know if there is anything I need to fix, or more importantly, how to get those above things sorted out. It would be greatly appreciated. thanks in advance
I'm not looking to spam anyone or sell their data but need help to test a simple market research system that i have built. I'm looking for about 25-50 people to let me send them an email inviting them to a webform to see if the "process" works correctly from start to finish.
The form asks for limited data about people but nothing that can identify them personally. Just gender, age group and postcode prefix.
Can anyone who is OK with sending me their email address to enable me to test this please send to:
I have a bunch of student test scores. The test is scored out of 100. I want to COUNT the scores (ie I want to know how many kids scored 50 etc...). This is easy enough except the crosstab query will be very wide ie 100 columns.
I cant seem to reduce the size by grouping them into ranges (ie count the number of kids that scored between 50 and 60 in a cross tab. I've tried variations with select queries but without luck.
Maybe there is a way to code it.. and then show it on a report??
I need to add some code to our access 2002 database to test incoming files for bytes, zero byte files in particular. Our system will then pick out the zero byte files for emailing to our customers. Can someone provide code for testing for bytes or provide me some direction on this matter? Thank you!
Hey all, I'm trying to design a Test / Survey database.
Please look at the .jpg attached or download the sample database.
I have looked at some previous survey/tests design posted on this forum and had a good table design based off of a Pat Hartman suggestion. Now i am wanting more out of the database and need more advanced options.
Here is what i am trying to do. When a user decides to make a new question for a test/survey they will have to choose what type of question the question will be. For example say the user wants to make a answer grid question. They would choose Answer Grid from the tblquestionstypes combobox. Then they would have the option of choosing a type of answer grid (Dual Scale, Rating Choice, Ranking Choice) from the tblQuestionOptionTypes combo box. Say the user chose Ranking Choice then they would be presented with a list of options for the Ranking Choice. For example 5 sets of rankings, 4 sets of rankings. 3 sets of rankings. (These are just coming off of the top of my head but i think you know what i mean.)
Question, Is this close to being correct. mind you i have just started this and am just throwing ideas around. Where could i store the correct answer for each question. Sometimes there will be a answer and sometimes there will not be an answer due to the fact that it could be a test or a survey.
Any help or suggestions would be appreciated. Thanks
A form with a text box expecting a date has the validation property as, >#1/1/2010# And Is Not Null. If a date is entered older that this the error is caught however if the field is left null it is not caught as an error. I have tried several modifications of this statement with the same results.
I've gotten to a point with my database where I have split it into front and back ends, and then made a copy so that I have a test version and a live version. I have users in live who've started keying data, and I'm working on forms and tables in test that I then copy to live as they are completed. Up to now, I've been just copying the individual item in test, and then pasting it over the version that exists in live (example: I made some changes to a form in test, copied that form, and then pasted over the version of the form that was in live).
Where it gets tricky is that I am also in the process of designing and insurance underwriting feature that's going to be a part of this application. I've set up all the tables in test, and now that I'm working on setting up the relationships, I'm wondering how I'm supposed to copy the relationship setup into live. Am I supposed to be copying the entire front-end from test when I have changes, and replacing the existing "live" front end with it? And if I do that, will I have to edit it every time to keep the new live front end from sending data keyed into it to my test version (had that happen when I initially split it)?
I am looking to create a database that collects data from past tests, predict probable future score, and compare to goal score. Currently I am studying for the Bar Exam and want to track (in all 7 subjects):
-my current scores for practice exams -prediction of what my score will be on exam day -comparison of actual and goal score -comparison of predictive and goal score -all of the above, separated by different types of Tests for each subject
Below is an example of the type of data :
Ex: Civil Procedure--06/15/15-Kaplan questions-> 6/10 (60% practice score)-> (predict gain 1 point 70%)-> (actual exam goal 20/28=71%) Civil Procedure --06/15/15--past MBE questions->7/10 (70% practice score)->(predict gain 1 point 80%)-> (actual exam goal 20/28=71%)
Also from this data I want to generate graphs
Would this be possible in Access? Should I use excel instead?