How can i go to the next blank record in the table , such a blank
record exists ?
In my form Customers, i have a command button with the following
command :
DoCmd.GoToRecord , "", acNewRec
DoCmd.GoToControl "CompanyName"
The above command is OK, but i want to amend it somehow . Do to some
reasons the users click the button without entering a new customer,
and in this case the table contains a customerid without a
CompanyName. Therefore, my task is the following :
If in the table customers there are records having blank CompanyName,
then do not go to the next record, but go to the next blank record,
without CompanyName, in ascending order I imagine my code to do the
following :
If Is Null the first field from the table with blank CompanyName
Then
go to this blank record ( the first in ascending order)
Else
DoCmd.GoToRecord , "", acNewRec
DoCmd.GoToControl "CompanyName"
End If
If i succedd, then we will have no blank CompanyNames in our database.
Is it posible and can somebody help me ? 2 6639
Why not just check to see if the company name is entered before moving to
the next record?
Use IsNull() or If = "" against the appropriate form control and skip the
move if it is null or empty.
Mike Storr www.veraccess.com
"Johm" <ke**@abv.bg> wrote in message
news:24**************************@posting.google.c om... How can i go to the next blank record in the table , such a blank record exists ?
In my form Customers, i have a command button with the following command : DoCmd.GoToRecord , "", acNewRec DoCmd.GoToControl "CompanyName"
The above command is OK, but i want to amend it somehow . Do to some reasons the users click the button without entering a new customer, and in this case the table contains a customerid without a CompanyName. Therefore, my task is the following :
If in the table customers there are records having blank CompanyName, then do not go to the next record, but go to the next blank record, without CompanyName, in ascending order I imagine my code to do the following :
If Is Null the first field from the table with blank CompanyName Then go to this blank record ( the first in ascending order) Else DoCmd.GoToRecord , "", acNewRec DoCmd.GoToControl "CompanyName" End If
If i succedd, then we will have no blank CompanyNames in our database.
Is it posible and can somebody help me ?
Johm wrote: If in the table customers there are records having blank CompanyName, then do not go to the next record, but go to the next blank record, without CompanyName, in ascending order I imagine my code to do the following :
If i succeed, then we will have no blank CompanyNames in our database.
Is it posible and can somebody help me ?
You can make the CompanyName field required. I believe that is the
better solution.
--
Bas Cost Budde http://www.heuveltop.org/BasCB
but the domain is nl This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: David |
last post by:
Hi,
I have the following code which adds a record to a table:
vUser = request.form("user") '(UserID = PK in table)
vPass = request.form("pass")
vEmail = request.form("email")
uSQL =...
|
by: Warren Wright |
last post by:
Hello,
We maintain a 175 million record database table for our customer.
This is an extract of some data collected for them by a third party
vendor, who sends us regular updates to that data...
|
by: Bob |
last post by:
Hi,
I am using Access 2000 to print out an address book. I have designed
the report based on a database whose first record is not blank. In the
design there is a one line report header, a onle...
|
by: Joe Scully |
last post by:
Hi all,
I am having trouble with access adding a blank record to a subform
everytime I finish entering data and closing the form. (The form and
subform are based on the one table)
When...
|
by: Karl Roes |
last post by:
Hi All,
I would like some advice on Next / Previous record buttons.
I have a main form for the client, and a continuous subform listing
client transactions. If I open one of these transactions...
|
by: MMcCarthy |
last post by:
Has anyone experienced this problem and found a solution.
I have a multipage form used to edit specified record. This form opens up filtered to a specified record and its relevant subforms etc.
...
|
by: chrislewis21 |
last post by:
How does one get a form to default to a new/blank record upon opening?
Thanks,
Chris
|
by: hannoudw |
last post by:
Hi i searched here but i didn't find out how to add a button and when i click on this button to open a new blank record?
I could really need some help. many thanks :)
|
by: NaughtyZute |
last post by:
In my Fleet Management Application, I'm pulling together three separate queries to then calculate Total Average Cost Per Mile for each Vehicle.
I have a total of 52 active vehicles. Some or all of...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |