After each import, you might query table MSysObjects for Type = 1 (local table) and instr([Name],"ImportError") > 0 (contains import error in the name). If one exists you can rename the existing table with the import errors to one you can recognize using DoCmd.Rename "OldtableName", acTable...
What you have appears to be an SQL statement created using the Create- Design View (Query-By-Example or QBE) in Access instead of writing it in code. When you create a Delete query in QBE you select the * from the field list, but if you aren't deleteing all of the reocrds you must also select...
I created a table with 2 fields, DataIn & DataOut. I had info in DataIn that contained <br /> and I ran this code to populate DataOut with a Carriage Return/Line Feed instead of the <br /> and then when I printed the data, it printed out fine in a report.
Dim db As DAO.Database, rst As...
One method is to use DCount() to check the table for a count of the records with the Primary Key value. If DCount returns zero, open the form to add a new record, if DCount returns 1, open a form with the filter set to the Primary Key, if more than one you can either populate a combobox/listbox...
I discovered that this code could hang up if it had one team left in the round and that team had already selected in that spot in a previous round. The fix required an Array, a new table, a query to reset the values in that table and code to check to see if the situation existed, and to redo...
try looking into macros.. see this link
http://www.databasejournal.com/features/msaccess/article.php/3790286/Setting-Up-Right-Click-Menus-for-Access-2007.htm
then it wouldn't be random would it. I thought by ensuring each team received one pick in each round until it exhausted it's pick was making it fair. I had originally used just a random process that sometimes ended up with the team with the lowest number of picks not getting a pick until the...
build the 2 tables, populate tbl_Teams with a record for each of the teams and number them (numerically starting with 1) and enter the number of picks into the field Entries.
Either build a form to put the code behind or put it in a module. Then call the code from either the form or the...
Not sure if this is what you're after or not.
I've created two tables:
tbl_Teams with 3 numeric fields
TeamNum
Entries
Drawn
tbl_Draft_By_Rounds with 21 numeric fields
DraftRound
Position1 through Position20
Pirmary Key is DraftRound
This allows you to have up to 20 teams with unlimited...
Skip, Your function works if fed upper case Characters only. If you change
sByt = Mid(Val, Len(Val) - i, 1)
to
sByt = Mid(Ucase(Val), Len(Val) - i, 1)
you can pass lower case revision numbers and get the correct answer
without UCase passing "aa" returns "AGG"
with UCase passing "aa"...
You probably need to check out the samples in the Northwind database that comes with ACCESS. It's not added as part of the normal installation, but it gives you some examples to learn from.
PaulF
Or something along this line
dim strWhere as String
strWhere = ""
If Len(Trim(Nz(cboName,"")))>0 then
strWhere = "[Test].[Name] = '" & cboName & "'"
End If
If Len(Trim(Nz(cboCompany,"")))>0 then
If strWhere <> "" Then
strWhere = "[Test].[Company] = '" & cboCompany & "'"
Else
strWhere =...
this is because Vista doesn't recognize the SendKeys used by previous versions. I got this from the web, and altered it to call the F11 key.
Option Compare Database
Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal code As Long, ByVal maptype As Long) As Long
Declare...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.