"broker = broker" means: broker(in tblBrokers) equals broker (in the same record, in the same table).
What you want to is: "broker = 'Jimmy'" or
"broker = 12345" (using numbers as a primary key is strongly advised).
Of course, 'Jimmy' or 12345 are variable, you...
The Where-clause "[Broker]=[Broker]" isn't very specific: it's like saying "get anyone whose age equals his own age".
You would need a stament like: "get anyone whose age equals " & TheAgeINeed, in your case something like
"[Broker] = " & me.Broker
Consider it a sacrifice to the gods of Access you mentioned.
Still seems to be a rather compicated way to solve something relatively simple but:
if it works don't fix it...
Strange, maybe you're using Access 2000? I thought that didn't use DAO, but might be mistaken (and to lazy to check...) I tried Bob's code, and it runs fine in A97. Even simpified the idea to:
Private Sub cmdSave_Click()
DoCmd.RunSQL "INSERT INTO tblMyRecords ( recordid, recorddate )...
I 'm not sure if I get what you mean, but let's try anyway.
You want your combo to show something related to the first record in your form.
When a form opens, it opens on the first record. So, if you set the default value of your cbo to the related field in your form it might already do the...
BEWARE!
If you calculate a field there is always the risk of getting the same result twice, wich would mess things up rather badly if it's a primary key. Imagine what would happen in a multi-user setting.
If you realy must calculate do it when saving the record.
Private Sub...
Probably there's lot of people out there to help you, (I will if my boss or kid don't interfere) but more info is needed:
* is there an invitation-list, so do you know in advance who is coming?
* what are 'groups'? Companys you invited, or guests who happen to bring there inlaws without telling...
There is function that looks up a value in a table:
DLookUp(WhatField;InWhatTableOrQuery;WhatConditions).
So you could set the source of your textbox to:
=DLookUp("initials";"personel";"id_personel=tasks")
However, easier and faster is to make query joining the...
If it's a db you used to devellop in, and you made a lot of changes on the way, it might help to make a new (empty) database and import all objects from your old one.
I'd love to see that too.
The syntax you use is obivously wrong, as "msgForm" is a string, and you need an object.
Apart from that, I use load and hide in VB without any trouble, but never in VBA: I never succeeded in refering to an unopened form. The object-model is a bit confusing...
You can set this in the menu:
Extra => StartUp
(or something like that, my access-version is in (double)dutch.)
You can also set other start-up opions, the most important being: hide database-window.
As far as I know, this is almost impossible.
Your kids-table or -query needs a field indicating 'WhatKindOfKid', and the number of possible 'KindOfKids' needs to be limited.
In that case you can make a crosstab-query, with 'KindOfKid' as columnheader, and use it as source for a report. If there...
I guess the data-source of your report is the same table?
You have to apply a filter, to select the record that matches the current record on your form. To do that, you need an unique field in your table (usually called ID) or an unique combination of fields.
If the print-button on your forms...
I'm not sure what you mean by 'print as report'. If you mean that you made a report using the same query as the form, and you want the report to show just the current record of your form, then use this in the on_click event of your button:
docmd.OpenReport "",,,"field -" &...
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.