Thanks for your help.
workplanNo and workplanSectionNo are declared as Text (2 chars) in itsTbl.
I get a "type mismatch" error message.
When I remove the single quotes, I get a "Type mismatch in criteria expression" error message.
Thanks again,
Cheers,
John
Hi,
I am trying to write an automatic number generator for an issue tracking system.
The number should look like this:
08-06-003
Where 08 represents the workplan section related to the issue. 06 represents the year during which the issue was created. 003 is the number of the issue in...
Thanks Golom.
I have one more question:
In what context do I use the query?
If I use DoCmd.RunSQL, the debugger will only let me use the UPDATE statement, not the SELECT statement.
Also, Do I declare itsNo_3 as a string?
Thanks again,
John
Hi,
Is there a way to combine 2 SQL statements into 1?
Query1:
SELECT itsTbl.itsNo, itsTbl.workplanNo, itsTbl.workplanSectionNo
FROM itsTbl
WHERE (((itsTbl.workplanNo)=[Forms]![itsNewFrm]![workplanNoCombo]) AND ((itsTbl.workplanSectionNo)=[Forms]![itsNewFrm]![workplanSectionNoCombo]));
Query2...
First query: itsNoCount1Qry
SELECT itsTbl.itsNo, itsTbl.workplanNo, itsTbl.workplanSectionNo
FROM itsTbl
WHERE (((itsTbl.workplanNo)=[Forms]![itsNewFrm]![workplanNoCombo]) AND ((itsTbl.workplanSectionNo)=[Forms]![itsNewFrm]![workplanSectionNoCombo]));
Second query (subform record source)...
Record source for subform is countNo_3Qry:
itsNo_3: Max(Right([itsNo],3))+1
countNo_3Qry's source is another query that gets its criteria from the issue form 2 combo boxes:
workplan criteria = issueFrm!workplanCombo
workplanSection criteria = issueFrm!workplanSectionCombo
The first...
As you suggested, I used Max instead of Count in the subform query:
itsNo_3: Max(Right([itsNo],3))+1
The query works fine, but the subform still does not get updated.
Is there a way to have the issue number generated after updating the workplanSectionCombobox (second combo box)?
Thanks...
Hi,
I am trying to write an automatic number generator for an issue tracking system.
The number should look like this:
08-06-003
Where 08 represents the workplan section related to the issue. 06 represents the year during which the issue was created. 003 is the number of the issue in...
Hi,
How can I have a null sbureport not leave large gaps in a report?
I have all fields CanGrow and CanShrink set to yes.
When null, the subreport is invisible, but still takes room in the report.
Thanks,
John
When I use the following code, I get an error message:
Dim retval as Varient
RetVal = Shell("C:\uoi\mra\mra.mdb", 1)
Error message:
"Invalid procedure call or arguement".
John
Hi Ed2020,
Thanks for your reply.
The database is an instance MS Access 2000.
It is located on the same computer as the other database.
Would the command line look something like this?
Dim RetVal
RetVal = Shell("C:\uoi\mra\mra.mdb", 1)
Thanks again.
Cheers,
John
Hi,
How can I open a database from within another database?
Do I use the OpenDatabase command or the Shell command?
The 2 databases are independent from eachother.
How do I use these commands efficiently?
Thanks,
John
Hi stix4t2,
I use Me.Refresh to save the recordset before opening a form that will use the data inputed in the present form.
When I try using the recordsetclone command, I get the same error message as for the Me.Bookmark command.
Note that I have used similar code several times in the past...
NOTE:
The same compile error is generated by the line "Me.Bookmark" in the following code:
Private Sub ITSCombo_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ITSNo] = '" & Me![ITSCombo] & "'"
If Not...
Hi,
I have the following code attached to several subforms.
Private Sub viewCommStratBtn_Click()
On Error GoTo Err_viewCommStratBtn_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ITSCommStratsFrm"
stLinkCriteria = "[ITSCommStratsID]=" &...
...of birth
numBirths 'number of births for that year
logNumBirths ' natural log of numBirths
Query2 (from Query1) contains 1 row
n: Count(*) 'count number of records in Query1
sumX:Sum([YearNo]) 'sum of all years in Query1
Mx:[sumX]/[n] 'sum of years/number of years...
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.